COSObjectable
public class PDPixelMap extends PDXObjectImage
SUB_TYPE
Constructor | Description |
---|---|
PDPixelMap(PDStream pdStream) |
Standard constructor.
|
PDPixelMap(PDDocument doc,
java.awt.image.BufferedImage bi) |
Construct a pixel map image from an AWT image.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
Calling this will release all cached information.
|
COSDictionary |
getDecodeParams() |
Deprecated.
Use
PDStream.getDecodeParms() instead |
int |
getPredictor() |
Deprecated.
see
FlateFilter |
java.awt.image.BufferedImage |
getRGBImage() |
Returns a
BufferedImage of the COSStream
set in the constructor or null if the COSStream could not be encoded. |
void |
write2OutputStream(java.io.OutputStream out) |
Writes the image as .png.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commonXObjectCreation, createXObject, getCOSObject, getCOSStream, getMetadata, getPDStream, getStructParent, setMetadata, setStructParent
applyMasks, createThumbnailXObject, getBitsPerComponent, getColorSpace, getDecode, getHeight, getImageMask, getMask, getSMaskImage, getStencilColor, getSuffix, getWidth, hasMask, imageMask, mask, setBitsPerComponent, setColorSpace, setHeight, setStencilColor, setWidth, write2file, write2file
public PDPixelMap(PDStream pdStream)
pdStream
- The stream that holds the pixel map.public PDPixelMap(PDDocument doc, java.awt.image.BufferedImage bi) throws java.io.IOException
doc
- The PDF document to embed the image in.bi
- The image to read data from.java.io.IOException
- If there is an error while embedding this image.public java.awt.image.BufferedImage getRGBImage() throws java.io.IOException
BufferedImage
of the COSStream
set in the constructor or null if the COSStream could not be encoded.getRGBImage
in class PDXObjectImage
java.io.IOException
- If there is an error creating the image.public void write2OutputStream(java.io.OutputStream out) throws java.io.IOException
write2OutputStream
in class PDXObjectImage
out
- the OutputStream that the Image is written to.java.io.IOException
- when somethings wrong with outpublic COSDictionary getDecodeParams()
PDStream.getDecodeParms()
insteadpublic int getPredictor()
FlateFilter