Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.graphics.xobject » [javadoc | source]
org.apache.pdfbox.pdmodel.graphics.xobject
abstract public class: PDXObjectImage [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject
      org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage

All Implemented Interfaces:
    COSObjectable

Direct Known Subclasses:
    PDPixelMap, PDJpeg, PDCcitt

The prototype for all PDImages.
Field Summary
public static final  String SUB_TYPE    The XObject subtype. 
Constructor:
 public PDXObjectImage(PDStream imageStream,
    String fileSuffix) 
    Standard constuctor.
    Parameters:
    imageStream - The XObject is passed as a COSStream.
    fileSuffix - The file suffix, jpg/png.
 public PDXObjectImage(PDDocument doc,
    String fileSuffix) 
    Standard constuctor.
    Parameters:
    doc - The document to store the stream in.
    fileSuffix - The file suffix, jpg/png.
Method from org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage Summary:
getBitsPerComponent,   getColorSpace,   getHeight,   getImageMask,   getRGBImage,   getSuffix,   getWidth,   setBitsPerComponent,   setColorSpace,   setGraphicsState,   setHeight,   setWidth,   write2OutputStream,   write2file,   write2file
Methods from org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject:
createXObject,   getCOSObject,   getCOSStream,   getMetadata,   getPDStream,   setMetadata
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage Detail:
 public int getBitsPerComponent() 
    The bits per component of this image. This will return -1 if one has not been set.
 public PDColorSpace getColorSpace() throws IOException 
    This will get the color space or null if none exists.
 public int getHeight() 
    Get the height of the image.
 public boolean getImageMask() 
    Get the ImageMask flag. Used in Stencil Masking. Section 4.8.5 of the spec.
 abstract public BufferedImage getRGBImage() throws IOException
    Returns an java.awt.Image, that can be used for display etc.
 public String getSuffix() 
    This will get the suffix for this image type, jpg/png.
 public int getWidth() 
    Get the width of the image.
 public  void setBitsPerComponent(int bpc) 
    Set the number of bits per component.
 public  void setColorSpace(PDColorSpace cs) 
    This will set the color space for this image.
 public  void setGraphicsState(PDGraphicsState newGS) 
    Allow the Invoke operator to set the graphics state so that, in the case of an Image Mask, we can get to the current nonstroking colorspace.
 public  void setHeight(int height) 
    Set the height of the image.
 public  void setWidth(int width) 
    Set the width of the image.
 abstract public  void write2OutputStream(OutputStream out) throws IOException
    Writes the Image to out.
 public  void write2file(String filename) throws IOException 
    Writes the image to a file with the filename + an appropriate suffix, like "Image.jpg". The suffix is automatically set by the
 public  void write2file(File file) throws IOException 
    Writes the image to a file with the filename + an appropriate suffix, like "Image.jpg". The suffix is automatically set by the