public class ImageRawPNGAdapter extends AbstractImageAdapter
image| Constructor and Description |
|---|
ImageRawPNGAdapter(org.apache.xmlgraphics.image.loader.impl.ImageRawPNG image,
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.
|
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.
|
String |
getMask()
Get the PDF reference for a bitmap mask.
|
PDFFilter |
getPDFFilter()
Get the PDF Filter to be applied to the image.
|
String |
getSoftMask() |
PDFReference |
getSoftMaskReference()
Get the PDF reference for a soft mask.
|
PDFColor |
getTransparentColor()
Get the transparent color.
|
protected boolean |
issRGB() |
boolean |
isTransparent()
Check if this image has a transparent color transparency.
|
void |
outputContents(OutputStream out)
Writes the raw, unencoded contents of the image to a given output stream.
|
void |
populateXObjectDictionary(PDFDictionary dict)
Populates the XObject's dictionary with additional values.
|
void |
setup(PDFDocument doc)
Setup the PDF image for the current document.
|
disallowMultipleFilters, getEffectiveICCProfile, getHeight, getICCStream, getImageColorSpace, getKey, getWidth, isInverted, isPS, multipleFiltersAllowed, populateXObjectDictionaryForIndexColorModel, toPDFColorSpacepublic ImageRawPNGAdapter(org.apache.xmlgraphics.image.loader.impl.ImageRawPNG image,
String key)
image - the imagekey - XObject keypublic void setup(PDFDocument doc)
setup in interface PDFImagesetup in class AbstractImageAdapterdoc - the PDF parent document
(todo) Remove this and delegate to the XObjectpublic PDFDeviceColorSpace getColorSpace()
public int getBitsPerComponent()
public boolean isTransparent()
PDFImageXObject rely on this simple
binary model of transparency (e.g. compare to
Transparency) in order to render
color key masking (see PDF Spec 1.7 Chapter 8.9.6.4).
Therefore only return true if image has fully transparent
colors.isTransparent in interface PDFImageisTransparent in class AbstractImageAdapterpublic PDFColor getTransparentColor()
getTransparentColor in interface PDFImagegetTransparentColor in class AbstractImageAdapterpublic String getMask()
getMask in interface PDFImagegetMask in class AbstractImageAdapterpublic String getSoftMask()
getSoftMask in class AbstractImageAdapterpublic PDFReference getSoftMaskReference()
getSoftMaskReference in interface PDFImagegetSoftMaskReference in class AbstractImageAdapterpublic PDFFilter getPDFFilter()
public void outputContents(OutputStream out) throws IOException
out - OutputStream to write toIOException - if there creating streampublic String getFilterHint()
public void populateXObjectDictionary(PDFDictionary dict)
AbstractImageAdapterpopulateXObjectDictionary in interface PDFImagepopulateXObjectDictionary in class AbstractImageAdapterdict - the dictionary to fillprotected boolean issRGB()
issRGB in class AbstractImageAdapterCopyright © 2023 Apache Software Foundation. All rights reserved.