Constructor and Description |
---|
AlphaRasterImage(java.lang.String k,
java.awt.image.Raster alpha)
Create a alpha channel image.
|
AlphaRasterImage(java.lang.String k,
java.awt.image.RenderedImage image)
Create a alpha channel image.
|
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.
|
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() |
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(java.io.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.
|
public AlphaRasterImage(java.lang.String k, java.awt.image.Raster alpha)
k
- the key to be used to lookup the imagealpha
- the alpha channel rasterpublic AlphaRasterImage(java.lang.String k, java.awt.image.RenderedImage image)
k
- the key to be used to lookup the imageimage
- the image (must have an alpha channel)public void setup(PDFDocument doc)
public java.lang.String getKey()
public int getWidth()
public int getHeight()
public PDFDeviceColorSpace getColorSpace()
getColorSpace
in interface PDFImage
public int getBitsPerComponent()
getBitsPerComponent
in interface PDFImage
public boolean isTransparent()
isTransparent
in interface PDFImage
public PDFColor getTransparentColor()
getTransparentColor
in interface PDFImage
public java.lang.String getMask()
public java.lang.String getSoftMask()
public PDFReference getSoftMaskReference()
getSoftMaskReference
in interface PDFImage
public boolean isInverted()
isInverted
in interface PDFImage
public void outputContents(java.io.OutputStream out) throws java.io.IOException
outputContents
in interface PDFImage
out
- OutputStream to write tojava.io.IOException
- if there creating streampublic void populateXObjectDictionary(PDFDictionary dict)
populateXObjectDictionary
in interface PDFImage
dict
- the dictionary to fillpublic PDFICCStream getICCStream()
getICCStream
in interface PDFImage
public boolean isPS()
public java.lang.String getFilterHint()
getFilterHint
in interface PDFImage
public PDFFilter getPDFFilter()
getPDFFilter
in interface PDFImage
public boolean multipleFiltersAllowed()
multipleFiltersAllowed
in interface PDFImage
Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.