org.icepdf.core.pobjects
Class ImageStream

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.Stream
          extended by org.icepdf.core.pobjects.ImageStream

public class ImageStream
extends Stream

ImageStream contains image data that is contains in an XObject of subtype Image.

Since:
5.0

Field Summary
static Name BITSPERCOMPONENT_KEY
           
static Name BLACKIS1_KEY
           
static Name BPC_KEY
           
protected static java.lang.String[] CCITTFAX_DECODE_FILTERS
           
static Name COLUMNS_KEY
           
static Name D_KEY
           
protected static java.lang.String[] DCT_DECODE_FILTERS
           
static Name DECODE_KEY
           
static Name DECODEPARMS_KEY
           
static Name DP_KEY
           
static Name ENCODEDBYTEALIGN_KEY
           
protected static java.lang.String[] JBIG2_DECODE_FILTERS
           
static Name JBIG2GLOBALS_KEY
           
protected static java.lang.String[] JPX_DECODE_FILTERS
           
static Name K_KEY
           
static Name MASK_KEY
           
static Name ROWS_KEY
           
static Name SMASK_KEY
           
static Name TYPE_VALUE
           
 
Fields inherited from class org.icepdf.core.pobjects.Stream
COLORSPACE_KEY, compressed, CS_KEY, DECODEPARAM_KEY, F_KEY, FILTER_KEY, H_KEY, HEIGHT_KEY, I_KEY, IM_KEY, IMAGEMASK_KEY, INDEXED_KEY, pObjectReference, rawBytes, W_KEY, WIDTH_KEY
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
ImageStream(Library l, java.util.HashMap h, byte[] rawBytes)
           
ImageStream(Library l, java.util.HashMap h, SeekableInputConstrainedWrapper streamInputWrapper)
          Create a new instance of a Stream.
 
Method Summary
static void forceJaiCcittFax(boolean enable)
          Used to enable/disable the loading of CCITTFax images using JAI library.
 boolean getBlackIs1(Library library, java.util.HashMap decodeParmsDictionary)
          If BlackIs1 was not specified, then return null, instead of the default value of false, so we can tell if it was given or not
 PColorSpace getColourSpace()
           
 int getHeight()
           
 java.awt.image.BufferedImage getImage(java.awt.Color fill, Resources resources)
          Gets the image object for the given resource.
 int getWidth()
           
 void init()
          Initiate the Dictionary.
 boolean isImageMask()
          Does the image have an ImageMask.
 java.lang.String toString()
          Return a string description of the object.
 
Methods inherited from class org.icepdf.core.pobjects.Stream
getDecodedByteArrayInputStream, getDecodedStreamBytes, getDecodedStreamBytes, getFilterNames, getNormalisedFilterNames, getPObjectReference, getRawBytes, isImageSubtype, isRawBytesCompressed, setPObjectReference, setRawBytes
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, isDeleted, isNew, setDeleted, setNew
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_VALUE

public static final Name TYPE_VALUE

BITSPERCOMPONENT_KEY

public static final Name BITSPERCOMPONENT_KEY

BPC_KEY

public static final Name BPC_KEY

DECODE_KEY

public static final Name DECODE_KEY

D_KEY

public static final Name D_KEY

SMASK_KEY

public static final Name SMASK_KEY

MASK_KEY

public static final Name MASK_KEY

JBIG2GLOBALS_KEY

public static final Name JBIG2GLOBALS_KEY

DECODEPARMS_KEY

public static final Name DECODEPARMS_KEY

DP_KEY

public static final Name DP_KEY

K_KEY

public static final Name K_KEY

ENCODEDBYTEALIGN_KEY

public static final Name ENCODEDBYTEALIGN_KEY

COLUMNS_KEY

public static final Name COLUMNS_KEY

ROWS_KEY

public static final Name ROWS_KEY

BLACKIS1_KEY

public static final Name BLACKIS1_KEY

CCITTFAX_DECODE_FILTERS

protected static final java.lang.String[] CCITTFAX_DECODE_FILTERS

DCT_DECODE_FILTERS

protected static final java.lang.String[] DCT_DECODE_FILTERS

JBIG2_DECODE_FILTERS

protected static final java.lang.String[] JBIG2_DECODE_FILTERS

JPX_DECODE_FILTERS

protected static final java.lang.String[] JPX_DECODE_FILTERS
Constructor Detail

ImageStream

public ImageStream(Library l,
                   java.util.HashMap h,
                   SeekableInputConstrainedWrapper streamInputWrapper)
Create a new instance of a Stream.

Parameters:
l - library containing a hash of all document objects
h - HashMap of parameters specific to the Stream object.
streamInputWrapper - Accessor to stream byte data

ImageStream

public ImageStream(Library l,
                   java.util.HashMap h,
                   byte[] rawBytes)
Method Detail

init

public void init()
Description copied from class: Dictionary
Initiate the Dictionary. Retrieve any needed attributes.

Overrides:
init in class Dictionary

getWidth

public int getWidth()

getHeight

public int getHeight()

getImage

public java.awt.image.BufferedImage getImage(java.awt.Color fill,
                                             Resources resources)
Gets the image object for the given resource. This method can optionally scale an image to reduce the total memory foot print or to increase the perceived render quality on screen at low zoom levels.

Parameters:
fill - color value of image
resources - resouces containing image reference
Returns:
new image object

getBlackIs1

public boolean getBlackIs1(Library library,
                           java.util.HashMap decodeParmsDictionary)
If BlackIs1 was not specified, then return null, instead of the default value of false, so we can tell if it was given or not


isImageMask

public boolean isImageMask()
Does the image have an ImageMask.


forceJaiCcittFax

public static void forceJaiCcittFax(boolean enable)
Used to enable/disable the loading of CCITTFax images using JAI library. This method can be used in place of the system property org.icepdf.core.ccittfax.jai .

Parameters:
enable - eanb

getColourSpace

public PColorSpace getColourSpace()

toString

public java.lang.String toString()
Return a string description of the object. Primarily used for debugging.

Overrides:
toString in class Stream
Returns:
dictionary values.