Base class to implement the FopImage interface.
bitmaps
protected byte[] bitmaps
Image data (pixels, uncompressed).
bitsPerPixel
protected int bitsPerPixel
Bits per pixel.
colorSpace
protected ColorSpace colorSpace
Image color space (java.awt.color.ColorSpace).
dpiHorizontal
protected double dpiHorizontal
Horizontal bitmap resolution (in dpi)
dpiVertical
protected double dpiVertical
Vertical bitmap resolution (in dpi)
height
protected int height
Image height (in pixel).
imageInfo
protected FopImage.ImageInfo imageInfo
ImageReader object (to obtain image header informations).
inputStream
protected InputStream inputStream
Image input stream.
invertImage
protected boolean invertImage
Photoshop generated CMYK JPEGs are inverted.
isTransparent
protected boolean isTransparent
Image transparency.
loaded
protected int loaded
Keeps track of what has been loaded.
log
protected static Log log
logging instance
raw
protected byte[] raw
Image data (undecoded, compressed, for image formats that can be embedded without decoding.
transparentColor
protected Color transparentColor
Transparent color (java.awt.Color).
width
protected int width
Image width (in pixel).
getBitmaps
public byte[] getBitmaps()
Return the image data (pixels, uncompressed).
- getBitmaps in interface FopImage
getBitmapsSize
public int getBitmapsSize()
Return the image data size (number of bytes taken up by the uncompressed pixels).
- getBitmapsSize in interface FopImage
getBitsPerPixel
public int getBitsPerPixel()
Return the number of bits per pixel.
- getBitsPerPixel in interface FopImage
getColorSpace
public ColorSpace getColorSpace()
Return the image color space.
- getColorSpace in interface FopImage
- the image color space (java.awt.color.ColorSpace)
getHeight
public int getHeight()
- getHeight in interface FopImage
- the image height (in pixels)
getICCProfile
public ICC_Profile getICCProfile()
Get ICC profile for this image.
- getICCProfile in interface FopImage
- the icc profile or null if not applicable
getMimeType
public String getMimeType()
Get the mime type for this image.
- getMimeType in interface FopImage
- the mime type for the image
getRessourceBytes
public byte[] getRessourceBytes()
Return the original image data (compressed).
- getRessourceBytes in interface FopImage
getRessourceBytesSize
public int getRessourceBytesSize()
Return the original image data size (compressed).
- getRessourceBytesSize in interface FopImage
- the original image data size
getSoftMask
public byte[] getSoftMask()
Get the soft mask.
The soft mask should have the same bitdepth as the image data.
- getSoftMask in interface FopImage
- the data array of soft mask values
getTransparentColor
public Color getTransparentColor()
Return the transparent color.
- getTransparentColor in interface FopImage
- the transparent color (java.awt.Color)
getWidth
public int getWidth()
- getWidth in interface FopImage
- the image width (in pixels)
hasSoftMask
public boolean hasSoftMask()
Check if this image has a soft mask.
- hasSoftMask in interface FopImage
- true if the image also has a soft transparency mask
isInverted
public boolean isInverted()
- isInverted in interface FopImage
- true for CMYK images generated by Adobe Photoshop
isTransparent
public boolean isTransparent()
Return the image transparency.
- isTransparent in interface FopImage
- true if the image is transparent
load
public boolean load(int type)
Load image data and initialize its properties.
- load in interface FopImage
type
- the type of loading to do
- true if the loading was successful
loadBitmap
protected boolean loadBitmap()
Load a bitmap array of the image.
If the renderer requires a bitmap image then the
implementations should override this to load the bitmap.
- true if the loading was successful
loadDefaultOriginalData
protected boolean loadDefaultOriginalData()
Load the original image data. This is generic code for use by any
subclass that wants to use this from a loadOriginalData() implementation.
- true if the loading was successful
loadDimensions
protected boolean loadDimensions()
Load the dimensions of the image.
All implementations should override this to get and
return the dimensions.
- true if the loading was successful
loadOriginalData
protected boolean loadOriginalData()
Load the original image data.
In some cases the original data can be used by the renderer.
This should load the data and any other associated information.
- true if the loading was successful