-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
kestrel
-
generic
-
generic
When dataBuffer parameter of RasterFactory.createRaster() is null, JAI does not
throw any exception.
The following program can be used to illustrate this behaviour.
import java.awt.Point;
import java.awt.image.SampleModel;
import java.awt.image.BandedSampleModel;
import java.awt.image.DataBuffer;
import javax.media.jai.RasterFactory;
class Bug_createRaster_S_D_P_17 {
public static void main(String args[]) {
SampleModel sm =
new BandedSampleModel(DataBuffer.TYPE_BYTE, 12, 34, 12,
new int[]{0,1,2}, new int[]{0,0,0});
RasterFactory.createRaster(sm, null, new Point(0,0));
}
}
--------------------------
daniel.rice@Eng 1999-01-04
The JAI method simply calls Raster.createRaster. So the problem exists within
Java2D. The non-JAI test program is as follows:
import java.awt.Point;
import java.awt.image.SampleModel;
import java.awt.image.BandedSampleModel;
import java.awt.image.DataBuffer;
import java.awt.image.Raster;
class Bug_createRaster_S_D_P_17 {
public static void main(String args[]) {
SampleModel sm =
new BandedSampleModel(DataBuffer.TYPE_BYTE, 12, 34, 12,
new int[]{0,1,2}, new int[]{0,0,0});
Raster.createRaster(sm, null, new Point(0,0));
}
}