| java.lang.Object org.pdfbox.pdmodel.graphics.xobject.PDXObject org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage
All known Subclasses: org.pdfbox.pdmodel.graphics.xobject.PDCcitt, org.pdfbox.pdmodel.graphics.xobject.PDJpeg, org.pdfbox.pdmodel.graphics.xobject.PDPixelMap,
PDXObjectImage | abstract public class PDXObjectImage extends PDXObject (Code) | | The prototype for all PDImages.
author: Ben Litchfield author: mathiak version: $Revision: 1.9 $ |
SUB_TYPE | final public static String SUB_TYPE(Code) | | The XObject subtype.
|
PDXObjectImage | public PDXObjectImage(PDStream imageStream, String fileSuffix)(Code) | | Standard constuctor.
Parameters: imageStream - The XObject is passed as a COSStream. Parameters: fileSuffix - The file suffix, jpg/png. |
PDXObjectImage | public PDXObjectImage(PDDocument doc, String fileSuffix)(Code) | | Standard constuctor.
Parameters: doc - The document to store the stream in. Parameters: fileSuffix - The file suffix, jpg/png. |
getBitsPerComponent | public int getBitsPerComponent()(Code) | | The bits per component of this image. This will return -1 if one has not
been set.
The number of bits per component. |
getColorSpace | public PDColorSpace getColorSpace() throws IOException(Code) | | This will get the color space or null if none exists.
The color space for this image. throws: IOException - If there is an error getting the colorspace. |
getHeight | public int getHeight()(Code) | | Get the height of the image.
The height of the image. |
getRGBImage | abstract public BufferedImage getRGBImage() throws IOException(Code) | | Returns an java.awt.Image, that can be used for display etc.
This PDF object as an AWT image. throws: IOException - If there is an error creating the image. |
getSuffix | public String getSuffix()(Code) | | This will get the suffix for this image type, jpg/png.
The image suffix. |
getWidth | public int getWidth()(Code) | | Get the width of the image.
The width of the image. |
setBitsPerComponent | public void setBitsPerComponent(int bpc)(Code) | | Set the number of bits per component.
Parameters: bpc - The number of bits per component. |
setColorSpace | public void setColorSpace(PDColorSpace cs)(Code) | | This will set the color space for this image.
Parameters: cs - The color space for this image. |
setHeight | public void setHeight(int height)(Code) | | Set the height of the image.
Parameters: height - The height of the image. |
setWidth | public void setWidth(int width)(Code) | | Set the width of the image.
Parameters: width - The width of the image. |
write2OutputStream | abstract public void write2OutputStream(OutputStream out) throws IOException(Code) | | Writes the Image to out.
Parameters: out - the OutputStream that the Image is written to. throws: IOException - when somethings wrong with out |
write2file | public void write2file(String filename) throws IOException(Code) | | Writes the image to a file with the filename + an appropriate suffix, like "Image.jpg".
The suffix is automatically set by the
Parameters: filename - the filename throws: IOException - When somethings wrong with the corresponding file. |
|
|