fop 0.94

org.apache.fop.pdf
Interface PDFImage

All Known Implementing Classes:
BitmapImage, FopPDFImage

public interface PDFImage

Interface for a PDF image. This is used for inserting an image into PDF.


Method Summary
 int getBitsPerPixel()
          Get the bits per pixel for this image.
 PDFDeviceColorSpace getColorSpace()
          Get the color space for this image.
 java.lang.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.
 int getHeight()
          Get the image height in pixels.
 PDFICCStream getICCStream()
          Get the ICC stream for this image.
 java.lang.String getKey()
          Key to look up XObject.
 java.lang.String getMask()
          Get the PDF reference for a bitmap mask.
 PDFFilter getPDFFilter()
          Get the PDF Filter to be applied to the image.
 java.lang.String getSoftMask()
          Get the PDF reference for a soft mask.
 PDFColor getTransparentColor()
          Get the transparent color.
 int getWidth()
          Get the image width in pixels.
 boolean isInverted()
           
 boolean isPS()
          Check if this image is a PostScript image.
 boolean isTransparent()
          Check if this image has a transparent color transparency.
 void outputContents(java.io.OutputStream out)
          Writes the raw, unencoded contents of the image to a given output stream.
 void setup(PDFDocument doc)
          Setup the PDF image for the current document.
 

Method Detail

getKey

public java.lang.String getKey()
Key to look up XObject. This should be a unique key to refer to the image.

Returns:
the key for this image

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).

Parameters:
doc - the PDF parent document (todo) Remove this and delegate to the XObject

getWidth

public int getWidth()
Get the image width in pixels.

Returns:
the image width

getHeight

public int getHeight()
Get the image height in pixels.

Returns:
the image height

getColorSpace

public PDFDeviceColorSpace getColorSpace()
Get the color space for this image. Possible results are: DeviceGray, DeviceRGB, or DeviceCMYK

Returns:
the color space

getBitsPerPixel

public int getBitsPerPixel()
Get the bits per pixel for this image.

Returns:
the bits per pixel

isPS

public boolean isPS()
Check if this image is a PostScript image.

Returns:
true if this is a PostScript image

isTransparent

public boolean isTransparent()
Check if this image has a transparent color transparency.

Returns:
true if it has transparency

getTransparentColor

public PDFColor getTransparentColor()
Get the transparent color.

Returns:
the transparent color for this image

getMask

public java.lang.String getMask()
Get the PDF reference for a bitmap mask.

Returns:
the PDF reference for the mask image

getSoftMask

public java.lang.String getSoftMask()
Get the PDF reference for a soft mask.

Returns:
the PDF reference for a soft mask image

isInverted

public boolean isInverted()
Returns:
true for CMYK images generated by Adobe Photoshop

getPDFFilter

public PDFFilter getPDFFilter()
Get the PDF Filter to be applied to the image.

Returns:
the PDF Filter or null

outputContents

public void outputContents(java.io.OutputStream out)
                    throws java.io.IOException
Writes the raw, unencoded contents of the image to a given output stream.

Parameters:
out - OutputStream to write to
Throws:
java.io.IOException - if there creating stream

getICCStream

public PDFICCStream getICCStream()
Get the ICC stream for this image.

Returns:
the ICC stream for this image if any

getFilterHint

public java.lang.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.

Returns:
the filter setup hint

fop 0.94

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