public class ImageRawJPEGAdapter extends AbstractImageAdapter
The JPEG is copied to the XObject's stream as-is but some elements (marker segments) are filtered. For example, an embedded color profile is filtered since it is already added as a PDF object and associated with the XObject. This way, the PDF file size is kept as small as possible.
image
Constructor and Description |
---|
ImageRawJPEGAdapter(org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG image,
java.lang.String key)
Creates a new PDFImage from an Image instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getBitsPerComponent()
Get the bits per color component 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.
|
org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG |
getImage()
Returns the
ImageRawJPEG instance for this adapter. |
PDFFilter |
getPDFFilter()
Get the PDF Filter to be applied to the image.
|
boolean |
isInverted() |
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.
|
disallowMultipleFilters, getEffectiveICCProfile, getHeight, getICCStream, getImageColorSpace, getKey, getMask, getSoftMask, getSoftMaskReference, getTransparentColor, getWidth, isPS, issRGB, isTransparent, multipleFiltersAllowed, populateXObjectDictionary, populateXObjectDictionaryForIndexColorModel, toPDFColorSpace
public ImageRawJPEGAdapter(org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG image, java.lang.String key)
image
- the JPEG imagekey
- XObject keypublic org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG getImage()
ImageRawJPEG
instance for this adapter.public void setup(PDFDocument doc)
setup
in interface PDFImage
setup
in class AbstractImageAdapter
doc
- the PDF parent document
(todo) Remove this and delegate to the XObjectpublic PDFDeviceColorSpace getColorSpace()
public int getBitsPerComponent()
public boolean isInverted()
AbstractImageAdapter
isInverted
in interface PDFImage
isInverted
in class AbstractImageAdapter
public PDFFilter getPDFFilter()
public void outputContents(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream to write tojava.io.IOException
- if there creating streampublic java.lang.String getFilterHint()
Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.