public class ImageRawPNG extends ImageRawStream
ImageRawStream.ByteArrayStreamFactory, ImageRawStream.InputStreamFactory
Modifier and Type | Field and Description |
---|---|
private int |
bitDepth |
private int |
blueTransparentAlpha |
private java.awt.image.ColorModel |
cm |
private int |
grayTransparentAlpha |
private int |
greenTransparentAlpha |
private java.awt.color.ICC_Profile |
iccProfile |
private boolean |
isTransparent |
private int |
redTransparentAlpha |
private int |
renderingIntent |
Constructor and Description |
---|
ImageRawPNG(ImageInfo info,
java.io.InputStream in,
java.awt.image.ColorModel colorModel,
int bitDepth,
java.awt.color.ICC_Profile iccProfile)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getBitDepth()
The bit depth of each color channel.
|
java.awt.image.ColorModel |
getColorModel()
Returns the image's color model.
|
java.awt.color.ColorSpace |
getColorSpace()
Returns the image's color space.
|
java.awt.color.ICC_Profile |
getICCProfile()
Returns the ICC color profile if one is associated with the PNG image.
|
int |
getRenderingIntent()
Returns the rendering intent of the sRGB color space.
|
java.awt.Color |
getTransparentColor()
The color of the transparent pixel.
|
boolean |
isTransparent()
Whether the image is transparent (meaning there is a transparent pixel)
|
protected void |
setGrayTransparentAlpha(int gray)
Sets the gray transparent pixel value.
|
void |
setRenderingIntent(int intent)
Used to set the rendering intent when the color space is sRGB.
|
protected void |
setRGBTransparentAlpha(int red,
int green,
int blue)
Sets the RGB transparent pixel values.
|
protected void |
setTransparent()
Used to flag image as transparent when the image is of pallete type.
|
createInputStream, getFlavor, getMimeType, isCacheable, setInputStreamFactory, writeTo
getInfo, getSize, toString
private java.awt.image.ColorModel cm
private java.awt.color.ICC_Profile iccProfile
private int bitDepth
private boolean isTransparent
private int grayTransparentAlpha
private int redTransparentAlpha
private int greenTransparentAlpha
private int blueTransparentAlpha
private int renderingIntent
public ImageRawPNG(ImageInfo info, java.io.InputStream in, java.awt.image.ColorModel colorModel, int bitDepth, java.awt.color.ICC_Profile iccProfile)
info
- the image info objectin
- the ImageInputStream with the raw contentcolorModel
- the color modelbitDepth
- the bit depthiccProfile
- an ICC color profile or null if no profile is associatedpublic int getBitDepth()
public java.awt.color.ICC_Profile getICCProfile()
getICCProfile
in interface Image
getICCProfile
in class AbstractImage
public java.awt.image.ColorModel getColorModel()
public java.awt.color.ColorSpace getColorSpace()
getColorSpace
in interface Image
getColorSpace
in class AbstractImage
protected void setGrayTransparentAlpha(int gray)
gray
- the transparent pixel gray value (0...255)protected void setRGBTransparentAlpha(int red, int green, int blue)
red
- the transparent pixel red value (0...255)green
- the transparent pixel green value (0...255)blue
- the transparent pixel blue value (0...255)protected void setTransparent()
public boolean isTransparent()
public java.awt.Color getTransparentColor()
public void setRenderingIntent(int intent)
intent
- the rendering intent of the sRGB color spacepublic int getRenderingIntent()