Package org.apache.fop.render.pdf
Class ImageRawCCITTFaxAdapter
java.lang.Object
org.apache.fop.render.pdf.AbstractImageAdapter
org.apache.fop.render.pdf.ImageRawCCITTFaxAdapter
- All Implemented Interfaces:
PDFImage
PDFImage implementation for the PDF renderer which handles raw CCITT fax images.
-
Field Summary
Fields inherited from class org.apache.fop.render.pdf.AbstractImageAdapter
image
-
Constructor Summary
ConstructorDescriptionImageRawCCITTFaxAdapter
(org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax image, String key) Creates a new PDFImage from an Image instance. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the bits per color component for this image.Get the color space for this image.Returns a hint in form of a String (Possible values from PDFFilterList) indicating which filter setup should be used to encode the object.org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax
getImage()
Returns theImageRawCCITTFax
instance for this adapter.Get the PDF Filter to be applied to the image.void
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.Methods inherited from class org.apache.fop.render.pdf.AbstractImageAdapter
disallowMultipleFilters, getEffectiveICCProfile, getHeight, getICCStream, getImageColorSpace, getKey, getMask, getSoftMask, getSoftMaskReference, getTransparentColor, getWidth, isInverted, isPS, issRGB, isTransparent, multipleFiltersAllowed, populateXObjectDictionary, populateXObjectDictionaryForIndexColorModel, toPDFColorSpace
-
Constructor Details
-
ImageRawCCITTFaxAdapter
public ImageRawCCITTFaxAdapter(org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax image, String key) Creates a new PDFImage from an Image instance.- Parameters:
image
- the CCITT encoded imagekey
- XObject key
-
-
Method Details
-
getImage
public org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax getImage()Returns theImageRawCCITTFax
instance for this adapter.- Returns:
- the image instance
-
setup
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).- Specified by:
setup
in interfacePDFImage
- Overrides:
setup
in classAbstractImageAdapter
- Parameters:
doc
- the PDF parent document (todo) Remove this and delegate to the XObject
-
getColorSpace
Get the color space for this image. Possible results are: DeviceGray, DeviceRGB, or DeviceCMYK- Returns:
- the color space
-
getBitsPerComponent
public int getBitsPerComponent()Get the bits per color component for this image.- Returns:
- the bits per component
-
getPDFFilter
Get the PDF Filter to be applied to the image.- Returns:
- the PDF Filter or null
-
outputContents
Writes the raw, unencoded contents of the image to a given output stream.- Parameters:
out
- OutputStream to write to- Throws:
IOException
- if there creating stream
-
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
-