public class PDJpeg extends PDXObjectImage
SUB_TYPE| Constructor and Description |
|---|
PDJpeg(PDDocument doc,
java.awt.image.BufferedImage bi)
Construct from a buffered image.
|
PDJpeg(PDDocument doc,
java.awt.image.BufferedImage bi,
float compressionQuality)
Construct from a buffered image.
|
PDJpeg(PDDocument doc,
java.io.InputStream is)
Construct from a stream.
|
PDJpeg(PDStream jpeg)
Standard constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Calling this will release all cached information.
|
java.awt.image.BufferedImage |
getRGBImage()
Returns an image of the JPeg, or null if JPegs are not supported.
|
void |
write2OutputStream(java.io.OutputStream out)
This writes the JPeg to out.
|
applyMasks, createThumbnailXObject, getBitsPerComponent, getColorSpace, getDecode, getHeight, getImageMask, getMask, getSMaskImage, getStencilColor, getSuffix, getWidth, hasMask, imageMask, mask, setBitsPerComponent, setColorSpace, setHeight, setStencilColor, setWidth, write2file, write2filecommonXObjectCreation, createXObject, getCOSObject, getCOSStream, getMetadata, getPDStream, getStructParent, setMetadata, setStructParentpublic PDJpeg(PDStream jpeg)
jpeg - The COSStream from which to extract the JPegpublic PDJpeg(PDDocument doc, java.io.InputStream is) throws java.io.IOException
doc - The document to create the image as part of.is - The stream that contains the jpeg data.java.io.IOException - If there is an error reading the jpeg data.public PDJpeg(PDDocument doc, java.awt.image.BufferedImage bi) throws java.io.IOException
doc - The document to create the image as part of.bi - The image to convert to a jpegjava.io.IOException - If there is an error processing the jpeg data.public PDJpeg(PDDocument doc, java.awt.image.BufferedImage bi, float compressionQuality) throws java.io.IOException
doc - The document to create the image as part of.bi - The image to convert to a jpegcompressionQuality - The quality level which is used to compress the imagejava.io.IOException - If there is an error processing the jpeg data.public java.awt.image.BufferedImage getRGBImage()
throws java.io.IOException
getRGBImage in class PDXObjectImagejava.io.IOExceptionpublic void write2OutputStream(java.io.OutputStream out)
throws java.io.IOException
write2OutputStream in class PDXObjectImageout - the OutputStream that the Image is written to.java.io.IOException - when somethings wrong with out