org.pdfbox.pdmodel.graphics.xobject
Class PDJpeg
- COSObjectable
An image class for JPegs.
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.
|
getBitsPerComponent , getColorSpace , getHeight , getRGBImage , getSuffix , getWidth , setBitsPerComponent , setColorSpace , setHeight , setWidth , write2OutputStream , write2file |
PDJpeg
public PDJpeg(PDDocument doc,
BufferedImage bi)
throws IOException
Construct from a buffered image.
doc
- The document to create the image as part of.bi
- The image to convert to a jpeg
PDJpeg
public PDJpeg(PDDocument doc,
InputStream is)
throws IOException
Construct from a stream.
doc
- The document to create the image as part of.is
- The stream that contains the jpeg data.
PDJpeg
public PDJpeg(PDStream jpeg)
Standard constructor.
jpeg
- The COSStream from which to extract the JPeg
getRGBImage
public BufferedImage getRGBImage()
throws IOException
Returns an image of the JPeg, or null if JPegs are not supported. (They should be. )
- getRGBImage in interface PDXObjectImage
write2OutputStream
public void write2OutputStream(OutputStream out)
throws IOException
This writes the JPeg to out.
- write2OutputStream in interface PDXObjectImage