@@ -123,135 +123,135 @@ public class BufferedImage extends Image implements RenderedImage, Transparency
123123 */
124124 public static final int TYPE_INT_ARGB_PRE = 3 ;
125125 //
126- // /**
127- // * Represents an image with 8-bit RGB color components, corresponding
128- // * to a Windows- or Solaris- style BGR color model, with the colors
129- // * Blue, Green, and Red packed into integer pixels. There is no alpha.
130- // * The image has a {@link DirectColorModel}.
131- // * When data with non-opaque alpha is stored
132- // * in an image of this type,
133- // * the color data must be adjusted to a non-premultiplied form
134- // * and the alpha discarded,
135- // * as described in the
136- // * {@link java.awt.AlphaComposite} documentation.
137- // */
138- // public static final int TYPE_INT_BGR = 4;
139- //
140- // /**
141- // * Represents an image with 8-bit RGB color components, corresponding
142- // * to a Windows-style BGR color model) with the colors Blue, Green,
143- // * and Red stored in 3 bytes. There is no alpha. The image has a
144- // * <code>ComponentColorModel</code>.
145- // * When data with non-opaque alpha is stored
146- // * in an image of this type,
147- // * the color data must be adjusted to a non-premultiplied form
148- // * and the alpha discarded,
149- // * as described in the
150- // * {@link java.awt.AlphaComposite} documentation.
151- // */
152- // public static final int TYPE_3BYTE_BGR = 5;
153- //
154- // /**
155- // * Represents an image with 8-bit RGBA color components with the colors
156- // * Blue, Green, and Red stored in 3 bytes and 1 byte of alpha. The
157- // * image has a <code>ComponentColorModel</code> with alpha. The
158- // * color data in this image is considered not to be premultiplied with
159- // * alpha. The byte data is interleaved in a single
160- // * byte array in the order A, B, G, R
161- // * from lower to higher byte addresses within each pixel.
162- // */
163- // public static final int TYPE_4BYTE_ABGR = 6;
164- //
165- // /**
166- // * Represents an image with 8-bit RGBA color components with the colors
167- // * Blue, Green, and Red stored in 3 bytes and 1 byte of alpha. The
168- // * image has a <code>ComponentColorModel</code> with alpha. The color
169- // * data in this image is considered to be premultiplied with alpha.
170- // * The byte data is interleaved in a single byte array in the order
171- // * A, B, G, R from lower to higher byte addresses within each pixel.
172- // */
173- // public static final int TYPE_4BYTE_ABGR_PRE = 7;
174- //
175- // /**
176- // * Represents an image with 5-6-5 RGB color components (5-bits red,
177- // * 6-bits green, 5-bits blue) with no alpha. This image has
178- // * a <code>DirectColorModel</code>.
179- // * When data with non-opaque alpha is stored
180- // * in an image of this type,
181- // * the color data must be adjusted to a non-premultiplied form
182- // * and the alpha discarded,
183- // * as described in the
184- // * {@link java.awt.AlphaComposite} documentation.
185- // */
186- // public static final int TYPE_USHORT_565_RGB = 8;
187- //
188- // /**
189- // * Represents an image with 5-5-5 RGB color components (5-bits red,
190- // * 5-bits green, 5-bits blue) with no alpha. This image has
191- // * a <code>DirectColorModel</code>.
192- // * When data with non-opaque alpha is stored
193- // * in an image of this type,
194- // * the color data must be adjusted to a non-premultiplied form
195- // * and the alpha discarded,
196- // * as described in the
197- // * {@link java.awt.AlphaComposite} documentation.
198- // */
199- // public static final int TYPE_USHORT_555_RGB = 9;
200- //
201- // /**
202- // * Represents a unsigned byte grayscale image, non-indexed. This
203- // * image has a <code>ComponentColorModel</code> with a CS_GRAY
204- // * {@link ColorSpace}.
205- // * When data with non-opaque alpha is stored
206- // * in an image of this type,
207- // * the color data must be adjusted to a non-premultiplied form
208- // * and the alpha discarded,
209- // * as described in the
210- // * {@link java.awt.AlphaComposite} documentation.
211- // */
212- // public static final int TYPE_BYTE_GRAY = 10;
213- //
214- // /**
215- // * Represents an unsigned short grayscale image, non-indexed). This
216- // * image has a <code>ComponentColorModel</code> with a CS_GRAY
217- // * <code>ColorSpace</code>.
218- // * When data with non-opaque alpha is stored
219- // * in an image of this type,
220- // * the color data must be adjusted to a non-premultiplied form
221- // * and the alpha discarded,
222- // * as described in the
223- // * {@link java.awt.AlphaComposite} documentation.
224- // */
225- // public static final int TYPE_USHORT_GRAY = 11;
226- //
227- // /**
228- // * Represents an opaque byte-packed 1, 2, or 4 bit image. The
229- // * image has an {@link IndexColorModel} without alpha. When this
230- // * type is used as the <code>imageType</code> argument to the
231- // * <code>BufferedImage</code> constructor that takes an
232- // * <code>imageType</code> argument but no <code>ColorModel</code>
233- // * argument, a 1-bit image is created with an
234- // * <code>IndexColorModel</code> with two colors in the default
235- // * sRGB <code>ColorSpace</code>: {0, 0, 0} and
236- // * {255, 255, 255}.
237- // *
238- // * <p> Images with 2 or 4 bits per pixel may be constructed via
239- // * the <code>BufferedImage</code> constructor that takes a
240- // * <code>ColorModel</code> argument by supplying a
241- // * <code>ColorModel</code> with an appropriate map size.
242- // *
243- // * <p> Images with 8 bits per pixel should use the image types
244- // * <code>TYPE_BYTE_INDEXED</code> or <code>TYPE_BYTE_GRAY</code>
245- // * depending on their <code>ColorModel</code>.
246- //
247- // * <p> When color data is stored in an image of this type,
248- // * the closest color in the colormap is determined
249- // * by the <code>IndexColorModel</code> and the resulting index is stored.
250- // * Approximation and loss of alpha or color components
251- // * can result, depending on the colors in the
252- // * <code>IndexColorModel</code> colormap.
253- // */
254- // public static final int TYPE_BYTE_BINARY = 12;
126+ /**
127+ * Represents an image with 8-bit RGB color components, corresponding
128+ * to a Windows- or Solaris- style BGR color model, with the colors
129+ * Blue, Green, and Red packed into integer pixels. There is no alpha.
130+ * The image has a {@link DirectColorModel}.
131+ * When data with non-opaque alpha is stored
132+ * in an image of this type,
133+ * the color data must be adjusted to a non-premultiplied form
134+ * and the alpha discarded,
135+ * as described in the
136+ * {@link java.awt.AlphaComposite} documentation.
137+ */
138+ public static final int TYPE_INT_BGR = 4 ;
139+
140+ /**
141+ * Represents an image with 8-bit RGB color components, corresponding
142+ * to a Windows-style BGR color model) with the colors Blue, Green,
143+ * and Red stored in 3 bytes. There is no alpha. The image has a
144+ * <code>ComponentColorModel</code>.
145+ * When data with non-opaque alpha is stored
146+ * in an image of this type,
147+ * the color data must be adjusted to a non-premultiplied form
148+ * and the alpha discarded,
149+ * as described in the
150+ * {@link java.awt.AlphaComposite} documentation.
151+ */
152+ public static final int TYPE_3BYTE_BGR = 5 ;
153+
154+ /**
155+ * Represents an image with 8-bit RGBA color components with the colors
156+ * Blue, Green, and Red stored in 3 bytes and 1 byte of alpha. The
157+ * image has a <code>ComponentColorModel</code> with alpha. The
158+ * color data in this image is considered not to be premultiplied with
159+ * alpha. The byte data is interleaved in a single
160+ * byte array in the order A, B, G, R
161+ * from lower to higher byte addresses within each pixel.
162+ */
163+ public static final int TYPE_4BYTE_ABGR = 6 ;
164+
165+ /**
166+ * Represents an image with 8-bit RGBA color components with the colors
167+ * Blue, Green, and Red stored in 3 bytes and 1 byte of alpha. The
168+ * image has a <code>ComponentColorModel</code> with alpha. The color
169+ * data in this image is considered to be premultiplied with alpha.
170+ * The byte data is interleaved in a single byte array in the order
171+ * A, B, G, R from lower to higher byte addresses within each pixel.
172+ */
173+ public static final int TYPE_4BYTE_ABGR_PRE = 7 ;
174+
175+ /**
176+ * Represents an image with 5-6-5 RGB color components (5-bits red,
177+ * 6-bits green, 5-bits blue) with no alpha. This image has
178+ * a <code>DirectColorModel</code>.
179+ * When data with non-opaque alpha is stored
180+ * in an image of this type,
181+ * the color data must be adjusted to a non-premultiplied form
182+ * and the alpha discarded,
183+ * as described in the
184+ * {@link java.awt.AlphaComposite} documentation.
185+ */
186+ public static final int TYPE_USHORT_565_RGB = 8 ;
187+
188+ /**
189+ * Represents an image with 5-5-5 RGB color components (5-bits red,
190+ * 5-bits green, 5-bits blue) with no alpha. This image has
191+ * a <code>DirectColorModel</code>.
192+ * When data with non-opaque alpha is stored
193+ * in an image of this type,
194+ * the color data must be adjusted to a non-premultiplied form
195+ * and the alpha discarded,
196+ * as described in the
197+ * {@link java.awt.AlphaComposite} documentation.
198+ */
199+ public static final int TYPE_USHORT_555_RGB = 9 ;
200+
201+ /**
202+ * Represents a unsigned byte grayscale image, non-indexed. This
203+ * image has a <code>ComponentColorModel</code> with a CS_GRAY
204+ * {@link ColorSpace}.
205+ * When data with non-opaque alpha is stored
206+ * in an image of this type,
207+ * the color data must be adjusted to a non-premultiplied form
208+ * and the alpha discarded,
209+ * as described in the
210+ * {@link java.awt.AlphaComposite} documentation.
211+ */
212+ public static final int TYPE_BYTE_GRAY = 10 ;
213+
214+ /**
215+ * Represents an unsigned short grayscale image, non-indexed). This
216+ * image has a <code>ComponentColorModel</code> with a CS_GRAY
217+ * <code>ColorSpace</code>.
218+ * When data with non-opaque alpha is stored
219+ * in an image of this type,
220+ * the color data must be adjusted to a non-premultiplied form
221+ * and the alpha discarded,
222+ * as described in the
223+ * {@link java.awt.AlphaComposite} documentation.
224+ */
225+ public static final int TYPE_USHORT_GRAY = 11 ;
226+
227+ /**
228+ * Represents an opaque byte-packed 1, 2, or 4 bit image. The
229+ * image has an {@link IndexColorModel} without alpha. When this
230+ * type is used as the <code>imageType</code> argument to the
231+ * <code>BufferedImage</code> constructor that takes an
232+ * <code>imageType</code> argument but no <code>ColorModel</code>
233+ * argument, a 1-bit image is created with an
234+ * <code>IndexColorModel</code> with two colors in the default
235+ * sRGB <code>ColorSpace</code>: {0, 0, 0} and
236+ * {255, 255, 255}.
237+ *
238+ * <p> Images with 2 or 4 bits per pixel may be constructed via
239+ * the <code>BufferedImage</code> constructor that takes a
240+ * <code>ColorModel</code> argument by supplying a
241+ * <code>ColorModel</code> with an appropriate map size.
242+ *
243+ * <p> Images with 8 bits per pixel should use the image types
244+ * <code>TYPE_BYTE_INDEXED</code> or <code>TYPE_BYTE_GRAY</code>
245+ * depending on their <code>ColorModel</code>.
246+
247+ * <p> When color data is stored in an image of this type,
248+ * the closest color in the colormap is determined
249+ * by the <code>IndexColorModel</code> and the resulting index is stored.
250+ * Approximation and loss of alpha or color components
251+ * can result, depending on the colors in the
252+ * <code>IndexColorModel</code> colormap.
253+ */
254+ public static final int TYPE_BYTE_BINARY = 12 ;
255255
256256 /**
257257 * Represents an indexed byte image. When this type is used as the
0 commit comments