Java Code Examples for sun.awt.image.SunWritableRaster#makeTrackable()
The following examples show how to use
sun.awt.image.SunWritableRaster#makeTrackable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleManagedImage.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Returns the custom buffered image, which mostly identical to * BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride. * This means that the raster will have gaps, between the rows. */ private static BufferedImage makeCustomManagedBI() { int w = 511, h = 255; ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, w * 3 + 2, 3, bOffs, null); BufferedImage bi = new BufferedImage(colorModel, raster, true, null); SunWritableRaster.makeTrackable(raster.getDataBuffer()); SunWritableRaster.markDirty(bi); return bi; }
Example 2
Source File: IncorrectManagedImageSourceOffset.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Returns the custom buffered image, which mostly identical to * BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride. * This means that the raster will have gaps, between the rows. */ private static BufferedImage makeCustomManagedBI() { int w = 511, h = 255; ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, w * 3 + 2, 3, bOffs, null); BufferedImage bi = new BufferedImage(colorModel, raster, true, null); SunWritableRaster.makeTrackable(raster.getDataBuffer()); SunWritableRaster.markDirty(bi); return bi; }
Example 3
Source File: SimpleManagedImage.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Returns the custom buffered image, which mostly identical to * BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride. * This means that the raster will have gaps, between the rows. */ private static BufferedImage makeCustomManagedBI() { int w = 511, h = 255; ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, w * 3 + 2, 3, bOffs, null); BufferedImage bi = new BufferedImage(colorModel, raster, true, null); SunWritableRaster.makeTrackable(raster.getDataBuffer()); SunWritableRaster.markDirty(bi); return bi; }
Example 4
Source File: IncorrectManagedImageSourceOffset.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Returns the custom buffered image, which mostly identical to * BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride. * This means that the raster will have gaps, between the rows. */ private static BufferedImage makeCustomManagedBI() { int w = 511, h = 255; ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, w * 3 + 2, 3, bOffs, null); BufferedImage bi = new BufferedImage(colorModel, raster, true, null); SunWritableRaster.makeTrackable(raster.getDataBuffer()); SunWritableRaster.markDirty(bi); return bi; }
Example 5
Source File: SimpleManagedImage.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Returns the custom buffered image, which mostly identical to * BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride. * This means that the raster will have gaps, between the rows. */ private static BufferedImage makeCustomManagedBI() { int w = 511, h = 255; ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, w * 3 + 2, 3, bOffs, null); BufferedImage bi = new BufferedImage(colorModel, raster, true, null); SunWritableRaster.makeTrackable(raster.getDataBuffer()); SunWritableRaster.markDirty(bi); return bi; }
Example 6
Source File: IncorrectManagedImageSourceOffset.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Returns the custom buffered image, which mostly identical to * BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride. * This means that the raster will have gaps, between the rows. */ private static BufferedImage makeCustomManagedBI() { int w = 511, h = 255; ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, w * 3 + 2, 3, bOffs, null); BufferedImage bi = new BufferedImage(colorModel, raster, true, null); SunWritableRaster.makeTrackable(raster.getDataBuffer()); SunWritableRaster.markDirty(bi); return bi; }
Example 7
Source File: SimpleManagedImage.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Returns the custom buffered image, which mostly identical to * BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride. * This means that the raster will have gaps, between the rows. */ private static BufferedImage makeCustomManagedBI() { int w = 511, h = 255; ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, w * 3 + 2, 3, bOffs, null); BufferedImage bi = new BufferedImage(colorModel, raster, true, null); SunWritableRaster.makeTrackable(raster.getDataBuffer()); SunWritableRaster.markDirty(bi); return bi; }
Example 8
Source File: IncorrectManagedImageSourceOffset.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Returns the custom buffered image, which mostly identical to * BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride. * This means that the raster will have gaps, between the rows. */ private static BufferedImage makeCustomManagedBI() { int w = 511, h = 255; ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, w * 3 + 2, 3, bOffs, null); BufferedImage bi = new BufferedImage(colorModel, raster, true, null); SunWritableRaster.makeTrackable(raster.getDataBuffer()); SunWritableRaster.markDirty(bi); return bi; }