org.apache.fop.pdf
Interface PDFImage
- BitmapImage, FopPDFImage
public interface PDFImage
Interface for a PDF image.
This is used for inserting an image into PDF.
getBitsPerPixel
public int getBitsPerPixel()
Get the bits per pixel for this image.
getColorSpace
public PDFDeviceColorSpace getColorSpace()
Get the color space for this image.
Possible results are: DeviceGray, DeviceRGB, or DeviceCMYK
getFilterHint
public String getFilterHint()
Returns a hint in form of a String (Possible values from PDFFilterList)
indicating which filter setup should be used to encode the object.
getHeight
public int getHeight()
Get the image height in pixels.
getICCStream
public PDFICCStream getICCStream()
Get the ICC stream for this image.
- the ICC stream for this image if any
getKey
public String getKey()
Key to look up XObject.
This should be a unique key to refer to the image.
getMask
public String getMask()
Get the PDF reference for a bitmap mask.
- the PDF reference for the mask image
getPDFFilter
public PDFFilter getPDFFilter()
Get the PDF Filter to be applied to the image.
getSoftMask
public String getSoftMask()
Get the PDF reference for a soft mask.
- the PDF reference for a soft mask image
getTransparentColor
public PDFColor getTransparentColor()
Get the transparent color.
- the transparent color for this image
getWidth
public int getWidth()
Get the image width in pixels.
isInverted
public boolean isInverted()
- true for CMYK images generated by Adobe Photoshop
isPS
public boolean isPS()
Check if this image is a PostScript image.
- true if this is a PostScript image
isTransparent
public boolean isTransparent()
Check if this image has a transparent color transparency.
- true if it has transparency
outputContents
public void outputContents(OutputStream out)
throws IOException
Writes the raw, unencoded contents of the image to a given output stream.
out
- OutputStream to write to
setup
public void setup(PDFDocument doc)
Setup the PDF image for the current document.
Some image formats may need to access the document (for example to
add an ICC profile to the document).
doc
- the PDF parent document
(todo) Remove this and delegate to the XObject
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.