An instance of
for decoding images in
the PNG format.
allows several aspects of the decoding
process for PNG images to be controlled. By default, decoding produces
output images with the following properties:
Images with a bit depth of 8 or less use a
DataBufferByte to hold the pixel data. 16-bit images
Palette color images and non-transparent grayscale images with
bit depths of 1, 2, or 4 will have a
MultiPixelPackedSampleModel and an
IndexColorModel. For palette color images, the
ColorModel palette contains the red, green, blue, and
optionally alpha palette information. For grayscale images, the
palette is used to expand the pixel data to cover the range 0-255.
The pixels are stored packed 8, 4, or 2 to the byte.
All other images are stored using a
PixelInterleavedSampleModel with each sample of a pixel
occupying its own
used which simply extracts the red, green, blue, gray, and/or alpha
information from separate
Five aspects of this process may be altered by means of methods
in this class.
setSuppressAlpha() prevents an alpha channel
from appearing in the output.
setExpandPalette() turns palette-color images into
3-or 4-channel full-color images.
setOutput8BitGray() causes 1, 2, or 4 bit
grayscale images to be output in 8-bit form, using a
setDecodingExponent() causes the output image to be
gamma-corrected using a supplied output gamma value.
setExpandGrayAlpha() causes 2-channel gray/alpha
(GA) images to be output as full-color (GGGA) images, which may
simplify further processing and display.
This class is not a committed part of the JAI API. It may
be removed or changed in future releases of JAI.