org.icepdf.core.pobjects.graphics
Class ImageStreamReference

java.lang.Object
  extended by org.icepdf.core.pobjects.graphics.ImageReference
      extended by org.icepdf.core.pobjects.graphics.CachedImageReference
          extended by org.icepdf.core.pobjects.graphics.ImageStreamReference
All Implemented Interfaces:
java.util.concurrent.Callable<java.awt.image.BufferedImage>

public class ImageStreamReference
extends CachedImageReference

The ImageStreamReference class is a rudimentary Image Proxy which will try and decode the image data into an Buffered image using a worker thread. The intent is that the content parser will continue parsing the content stream while the worker thread handles the image decode work. However the drawImage method will block until the worker thread returns. So generally put not a true image proxy but we do get significantly faster load times with the current implementation.

Since:
5.0

Field Summary
 
Fields inherited from class org.icepdf.core.pobjects.graphics.ImageReference
fillColor, futureTask, image, imageStream, reference, resources, useProxy
 
Constructor Summary
protected ImageStreamReference(ImageStream imageStream, java.awt.Color fillColor, Resources resources)
           
 
Method Summary
 java.awt.image.BufferedImage call()
           
 int getHeight()
           
 int getWidth()
           
 
Methods inherited from class org.icepdf.core.pobjects.graphics.CachedImageReference
getImage
 
Methods inherited from class org.icepdf.core.pobjects.graphics.ImageReference
createImage, drawImage, getImageStream, isImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageStreamReference

protected ImageStreamReference(ImageStream imageStream,
                               java.awt.Color fillColor,
                               Resources resources)
Method Detail

getWidth

public int getWidth()
Specified by:
getWidth in class ImageReference

getHeight

public int getHeight()
Specified by:
getHeight in class ImageReference

call

public java.awt.image.BufferedImage call()