-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 8, 11, 17, 21, 25, 26
-
Component/s: client-libs
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
GraphicsConfiguration.createCompatibleImage will throw RasterFormatException: negative width for 0 width, which is not shown in doc.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.image.BufferedImage;
public class HeadlessGraphicsConfiguration {
public static void main(String args[]) {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
BufferedImage sourceImage = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D gd = ge.createGraphics(sourceImage);
GraphicsConfiguration gc = gd.getDeviceConfiguration();
BufferedImage bi3 = gc.createCompatibleImage(0, 0);
}
}
---------- END SOURCE ----------
GraphicsConfiguration.createCompatibleImage will throw RasterFormatException: negative width for 0 width, which is not shown in doc.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.image.BufferedImage;
public class HeadlessGraphicsConfiguration {
public static void main(String args[]) {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
BufferedImage sourceImage = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D gd = ge.createGraphics(sourceImage);
GraphicsConfiguration gc = gd.getDeviceConfiguration();
BufferedImage bi3 = gc.createCompatibleImage(0, 0);
}
}
---------- END SOURCE ----------