public interface PDFImage
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.
|
int |
getHeight()
Get the image height in pixels.
|
PDFICCStream |
getICCStream()
Get the ICC stream for this image.
|
String |
getKey()
Key to look up XObject.
|
String |
getMask()
Get the PDF reference for a bitmap mask.
|
PDFFilter |
getPDFFilter()
Get the PDF Filter to be applied to the image.
|
PDFReference |
getSoftMaskReference()
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.
|
boolean |
multipleFiltersAllowed()
Indicates whether multiple image filters are allowed; this is implemented because Adobe
Reader does not like multiple FlateDecode filters applied to an image even though that
allowed by the PDF spec; this is probable due to security concerns since many PDF malware
exploits, like zip bombs, make use of a chain of FlateDecode filters.
|
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.
|
String getKey()
void setup(PDFDocument doc)
doc
- the PDF parent document
(todo) Remove this and delegate to the XObjectint getWidth()
int getHeight()
PDFDeviceColorSpace getColorSpace()
int getBitsPerComponent()
boolean isPS()
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.PDFColor getTransparentColor()
String getMask()
PDFReference getSoftMaskReference()
boolean isInverted()
PDFFilter getPDFFilter()
void outputContents(OutputStream out) throws IOException
out
- OutputStream to write toIOException
- if there creating streamvoid populateXObjectDictionary(PDFDictionary dict)
dict
- the dictionary to fillPDFICCStream getICCStream()
String getFilterHint()
boolean multipleFiltersAllowed()
Copyright © 2022 Apache Software Foundation. All rights reserved.