|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pdfbox.pdmodel.graphics.xobject.PDXObject
org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage
org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg
public class PDJpeg
An image class for JPegs.
| Field Summary |
|---|
| Fields inherited from class org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage |
|---|
SUB_TYPE |
| Constructor Summary | |
|---|---|
PDJpeg(PDDocument doc,
BufferedImage bi)
Construct from a buffered image. |
|
PDJpeg(PDDocument doc,
BufferedImage bi,
float compressionQuality)
Construct from a buffered image. |
|
PDJpeg(PDDocument doc,
InputStream is)
Construct from a stream. |
|
PDJpeg(PDStream jpeg)
Standard constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Calling this will release all cached information. |
BufferedImage |
getRGBImage()
Returns an image of the JPeg, or null if JPegs are not supported. |
void |
write2OutputStream(OutputStream out)
This writes the JPeg to out. |
| Methods inherited from class org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage |
|---|
applyMasks, createThumbnailXObject, getBitsPerComponent, getColorSpace, getDecode, getHeight, getImageMask, getMask, getSMaskImage, getStencilColor, getSuffix, getWidth, hasMask, imageMask, mask, setBitsPerComponent, setColorSpace, setHeight, setStencilColor, setWidth, write2file, write2file |
| Methods inherited from class org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject |
|---|
commonXObjectCreation, createXObject, getCOSObject, getCOSStream, getMetadata, getPDStream, getStructParent, setMetadata, setStructParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PDJpeg(PDStream jpeg)
jpeg - The COSStream from which to extract the JPeg
public PDJpeg(PDDocument doc,
InputStream is)
throws IOException
doc - The document to create the image as part of.is - The stream that contains the jpeg data.
IOException - If there is an error reading the jpeg data.
public PDJpeg(PDDocument doc,
BufferedImage bi)
throws IOException
doc - The document to create the image as part of.bi - The image to convert to a jpeg
IOException - If there is an error processing the jpeg data.
public PDJpeg(PDDocument doc,
BufferedImage bi,
float compressionQuality)
throws 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 image
IOException - If there is an error processing the jpeg data.| Method Detail |
|---|
public BufferedImage getRGBImage()
throws IOException
getRGBImage in class PDXObjectImageIOException
public void write2OutputStream(OutputStream out)
throws IOException
write2OutputStream in class PDXObjectImageout - the OutputStream that the Image is written to.
IOException - when somethings wrong with outpublic void clear()
PDXObject
clear in class PDXObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||