org.apache.fop.image

Class XmlGraphicsCommonsImage

Implemented Interfaces:
FopImage
Known Direct Subclasses:
PNGImage, TIFFImage

public abstract class XmlGraphicsCommonsImage
extends AbstractFopImage

Abstract FopImage implementation which uses the internal codecs from XML Graphics Commons.
See Also:
AbstractFopImage, FopImage

Field Summary

protected CachableRed
cr
The Batik representation of the image
protected SeekableStream
seekableInput
The InputStream wrapped into a SeekableStream for decoding.

Fields inherited from class org.apache.fop.image.AbstractFopImage

bitmaps, bitsPerPixel, colorSpace, dpiHorizontal, dpiVertical, height, imageInfo, inputStream, invertImage, isTransparent, loaded, log, raw, transparentColor, width

Fields inherited from interface org.apache.fop.image.FopImage

BITMAP, DIMENSIONS, ORIGINAL_DATA

Constructor Summary

XmlGraphicsCommonsImage(FopImage.ImageInfo imgReader)
Constructs a new BatikImage instance.

Method Summary

protected abstract CachableRed
decodeImage(SeekableStream stream)
Decodes the image from the stream.
byte[]
getSoftMask()
boolean
hasSoftMask()
protected boolean
loadBitmap()
protected boolean
loadDimensions()
protected void
loadImage()
Loads the image from the InputStream.

Methods inherited from class org.apache.fop.image.AbstractFopImage

getBitmaps, getBitmapsSize, getBitsPerPixel, getColorSpace, getHeight, getHorizontalResolution, getICCProfile, getIntrinsicAlignmentAdjust, getIntrinsicHeight, getIntrinsicWidth, getMimeType, getOriginalURI, getRessourceBytes, getRessourceBytesSize, getSoftMask, getTransparentColor, getVerticalResolution, getWidth, hasSoftMask, isInverted, isTransparent, load, loadBitmap, loadDefaultOriginalData, loadDimensions, loadOriginalData

Field Details

cr

protected CachableRed cr
The Batik representation of the image

seekableInput

protected SeekableStream seekableInput
The InputStream wrapped into a SeekableStream for decoding.

Constructor Details

XmlGraphicsCommonsImage

public XmlGraphicsCommonsImage(FopImage.ImageInfo imgReader)
Constructs a new BatikImage instance.
Parameters:
imgReader - basic metadata for the image

Method Details

decodeImage

protected abstract CachableRed decodeImage(SeekableStream stream)
            throws IOException
Decodes the image from the stream.
Parameters:
stream - the stream to read the image from
Returns:
the decoded image

getSoftMask

public byte[] getSoftMask()
Specified by:
getSoftMask in interface FopImage
Overrides:
getSoftMask in interface AbstractFopImage

hasSoftMask

public boolean hasSoftMask()
Specified by:
hasSoftMask in interface FopImage
Overrides:
hasSoftMask in interface AbstractFopImage

loadBitmap

protected boolean loadBitmap()
Overrides:
loadBitmap in interface AbstractFopImage

loadDimensions

protected boolean loadDimensions()
Overrides:
loadDimensions in interface AbstractFopImage

loadImage

protected void loadImage()
Loads the image from the InputStream.

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.