|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfbox.pdmodel.graphics.xobject.PDXObject
org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage
org.pdfbox.pdmodel.graphics.xobject.PDJpeg
public class PDJpeg
An image class for JPegs.
Field Summary |
---|
Fields inherited from class org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage |
---|
SUB_TYPE |
Constructor Summary | |
---|---|
PDJpeg(PDDocument doc,
java.awt.image.BufferedImage bi)
Construct from a buffered image. |
|
PDJpeg(PDDocument doc,
java.io.InputStream is)
Construct from a stream. |
|
PDJpeg(PDStream jpeg)
Standard constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage |
---|
getBitsPerComponent, getColorSpace, getHeight, getSuffix, getWidth, setBitsPerComponent, setColorSpace, setHeight, setWidth, write2file |
Methods inherited from class org.pdfbox.pdmodel.graphics.xobject.PDXObject |
---|
createXObject, getCOSObject, getCOSStream, getMetadata, getPDStream, setMetadata |
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 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 jpeg
java.io.IOException
- If there is an error processing the jpeg data.Method Detail |
---|
public java.awt.image.BufferedImage getRGBImage() throws java.io.IOException
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 out
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |