-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta3
-
sparc
-
solaris_7
When BufferedImage of type TYPE_BYTE_BINARY is created and Graphics2D is obtained from the image, drawing shapes into it by calling fill method doesn't change any of the bits in the buffer. This doesn't happen when JDK 1.3.1 or JDK 1.3 is used. Please try the following to recreate:
Shape s2 = new Rectangle(0, 0, 5, 5);
BufferedImage bi = new BufferedImage(5, 5,
BufferedImage.TYPE_BYTE_BINARY);
Graphics2D g2d = bi.createGraphics();
g2d.fill(s2);
int[] pixels0 = bi.getData().getPixels(0, 0, 5, 5, (int[])null);
for (int i = 0; i < pixels0.length; i++)
System.out.println(pixels0[i]);
dongkyu% /net/java3d/export/jdk_1.4/Release/latest/solsparc/bin/java -version
java version "1.4.0-beta_refresh"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta_refresh-b71)
Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b71, mixed mode)
Happens on Solaris 7, 8, 9.
Shape s2 = new Rectangle(0, 0, 5, 5);
BufferedImage bi = new BufferedImage(5, 5,
BufferedImage.TYPE_BYTE_BINARY);
Graphics2D g2d = bi.createGraphics();
g2d.fill(s2);
int[] pixels0 = bi.getData().getPixels(0, 0, 5, 5, (int[])null);
for (int i = 0; i < pixels0.length; i++)
System.out.println(pixels0[i]);
dongkyu% /net/java3d/export/jdk_1.4/Release/latest/solsparc/bin/java -version
java version "1.4.0-beta_refresh"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta_refresh-b71)
Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b71, mixed mode)
Happens on Solaris 7, 8, 9.
- duplicates
-
JDK-4393368 ROI-based tests return incorrect images under jdk1.4 beta 42
- Closed