--- old/src/java.desktop/share/classes/java/awt/image/BufferedImage.java 2017-10-31 16:36:41.708760085 +0530 +++ new/src/java.desktop/share/classes/java/awt/image/BufferedImage.java 2017-10-31 16:36:41.476644085 +0530 @@ -30,6 +30,7 @@ import java.awt.Point; import java.awt.Rectangle; import java.awt.Transparency; +import java.awt.GraphicsConfiguration; import java.awt.color.ColorSpace; import java.security.AccessController; import java.security.PrivilegedAction; @@ -73,6 +74,7 @@ private final WritableRaster raster; private OffScreenImageSource osis; private Hashtable properties; + private GraphicsConfiguration graphicsConfig = null; /** * Image Type Constants @@ -291,6 +293,22 @@ * Constructs a {@code BufferedImage} of one of the predefined * image types. The {@code ColorSpace} for the image is the * default sRGB space. + * @param config graphics configuration + * @param width width of the created image + * @param height height of the created image + * @param imageType type of the created image + */ + public BufferedImage(GraphicsConfiguration config, int width, + int height, + int imageType) { + this(width, height, imageType); + this.graphicsConfig = config; + } + + /** + * Constructs a {@code BufferedImage} of one of the predefined + * image types. The {@code ColorSpace} for the image is the + * default sRGB space. * @param width width of the created image * @param height height of the created image * @param imageType type of the created image @@ -854,6 +872,15 @@ } /** + * Returns the {@code GraphicsConfiguration}. + * @return the {@code GraphicsConfiguration} of this + * {@code BufferedImage}. + */ + public GraphicsConfiguration getGraphicsConfig() { + return graphicsConfig; + } + + /** * Returns the {@link WritableRaster}. * @return the {@code WritableRaster} of this * {@code BufferedImage}.