Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.java.awt.peer.gtk
Class GdkPixbufDecoder.GdkPixbufReader  view GdkPixbufDecoder.GdkPixbufReader download GdkPixbufDecoder.GdkPixbufReader.java

java.lang.Object
  extended byjavax.imageio.ImageReader
      extended bygnu.java.awt.peer.gtk.GdkPixbufDecoder.GdkPixbufReader
All Implemented Interfaces:
java.awt.image.ImageConsumer
Enclosing class:
GdkPixbufDecoder

private static class GdkPixbufDecoder.GdkPixbufReader
extends javax.imageio.ImageReader
implements java.awt.image.ImageConsumer


Field Summary
(package private)  java.awt.image.BufferedImage bufferedImage
           
(package private)  GdkPixbufDecoder dec
           
(package private)  java.awt.image.ColorModel defaultModel
           
(package private)  java.lang.String ext
           
(package private)  int height
           
(package private)  int width
           
 
Fields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
GdkPixbufDecoder.GdkPixbufReader(GdkPixbufDecoder.GdkPixbufReaderSpi ownerSpi, java.lang.Object ext)
           
GdkPixbufDecoder.GdkPixbufReader(GdkPixbufDecoder.GdkPixbufReaderSpi ownerSpi, java.lang.Object ext, GdkPixbufDecoder d)
           
 
Method Summary
 java.awt.image.BufferedImage getBufferedImage()
           
 int getHeight(int imageIndex)
          Get the height of the input image in pixels.
 javax.imageio.metadata.IIOMetadata getImageMetadata(int i)
          Get the metadata associated with this image.
 java.util.Iterator getImageTypes(int imageIndex)
          Get an iterator over the collection of image types into which this reader can decode image data.
 int getNumImages(boolean allowSearch)
          Return the number of images available from the image input source, not including thumbnails.
 javax.imageio.metadata.IIOMetadata getStreamMetadata()
          Get the metadata associated with the image being read.
 int getWidth(int imageIndex)
          Get the width of the input image in pixels.
 void imageComplete(int status)
          The ImageProducer calls this method to indicate a single frame or the entire image is complete.
 java.awt.image.BufferedImage read(int imageIndex, javax.imageio.ImageReadParam param)
          Read the given frame into a buffered image using the given read parameters.
 void setColorModel(java.awt.image.ColorModel model)
          This ColorModel should indicate the model used by the majority of calls to setPixels.
 void setDimensions(int w, int h)
          An ImageProducer indicates the size of the image being produced using this method.
 void setHints(int flags)
          The ImageProducer should call this method with a bit mask of hints from any of RANDOMPIXELORDER, TOPDOWNLEFTRIGHT, COMPLETESCANLINES, SINGLEPASS, SINGLEFRAME.
 void setInput(java.lang.Object input, boolean seekForwardOnly, boolean ignoreMetadata)
          Set the input source to the given object, specify whether this reader should be allowed to read input from the data stream more than once, and specify whether this reader should ignore metadata in the input stream.
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int offset, int scansize)
          Deliver a subset of an ImageProducer's pixels to this ImageConsumer.
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int offset, int scansize)
          Deliver a subset of an ImageProducer's pixels to this ImageConsumer.
 void setProperties(java.util.Hashtable props)
          An ImageProducer can set a list of properties associated with this image by using this method.
 
Methods inherited from class javax.imageio.ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, getAspectRatio, getAvailableLocales, getDefaultReadParam, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isRandomAccessEasy, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readRaster, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, reset, setInput, setInput, setLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dec

GdkPixbufDecoder dec

bufferedImage

java.awt.image.BufferedImage bufferedImage

defaultModel

java.awt.image.ColorModel defaultModel

width

int width

height

int height

ext

java.lang.String ext
Constructor Detail

GdkPixbufDecoder.GdkPixbufReader

public GdkPixbufDecoder.GdkPixbufReader(GdkPixbufDecoder.GdkPixbufReaderSpi ownerSpi,
                                        java.lang.Object ext)

GdkPixbufDecoder.GdkPixbufReader

public GdkPixbufDecoder.GdkPixbufReader(GdkPixbufDecoder.GdkPixbufReaderSpi ownerSpi,
                                        java.lang.Object ext,
                                        GdkPixbufDecoder d)
Method Detail

setDimensions

public void setDimensions(int w,
                          int h)
Description copied from interface: java.awt.image.ImageConsumer
An ImageProducer indicates the size of the image being produced using this method.

Specified by:
setDimensions in interface java.awt.image.ImageConsumer

setProperties

public void setProperties(java.util.Hashtable props)
Description copied from interface: java.awt.image.ImageConsumer
An ImageProducer can set a list of properties associated with this image by using this method.

Specified by:
setProperties in interface java.awt.image.ImageConsumer

setColorModel

public void setColorModel(java.awt.image.ColorModel model)
Description copied from interface: java.awt.image.ImageConsumer
This ColorModel should indicate the model used by the majority of calls to setPixels. Each call to setPixels could however indicate a different ColorModel.

Specified by:
setColorModel in interface java.awt.image.ImageConsumer

setHints

public void setHints(int flags)
Description copied from interface: java.awt.image.ImageConsumer
The ImageProducer should call this method with a bit mask of hints from any of RANDOMPIXELORDER, TOPDOWNLEFTRIGHT, COMPLETESCANLINES, SINGLEPASS, SINGLEFRAME.

Specified by:
setHints in interface java.awt.image.ImageConsumer

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      byte[] pixels,
                      int offset,
                      int scansize)
Description copied from interface: java.awt.image.ImageConsumer
Deliver a subset of an ImageProducer's pixels to this ImageConsumer. Each element of the pixels array represents one pixel. The pixel data is formatted according to the color model model. The x and y parameters are the coordinates of the block of pixels being delivered to this ImageConsumer. They are specified relative to the top left corner of the image being produced. Likewise, w and h are the pixel block's dimensions.

Specified by:
setPixels in interface java.awt.image.ImageConsumer

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      int[] pixels,
                      int offset,
                      int scansize)
Description copied from interface: java.awt.image.ImageConsumer
Deliver a subset of an ImageProducer's pixels to this ImageConsumer. Each element of the pixels array represents one pixel. The pixel data is formatted according to the color model model. The x and y parameters are the coordinates of the rectangular region of pixels being delivered to this ImageConsumer, specified relative to the top left corner of the image being produced. Likewise, w and h are the pixel region's dimensions.

Specified by:
setPixels in interface java.awt.image.ImageConsumer

imageComplete

public void imageComplete(int status)
Description copied from interface: java.awt.image.ImageConsumer
The ImageProducer calls this method to indicate a single frame or the entire image is complete. The method is also used to indicate an error in loading or producing the image.

Specified by:
imageComplete in interface java.awt.image.ImageConsumer

getBufferedImage

public java.awt.image.BufferedImage getBufferedImage()

getNumImages

public int getNumImages(boolean allowSearch)
                 throws java.io.IOException
Description copied from class: javax.imageio.ImageReader
Return the number of images available from the image input source, not including thumbnails. This method will return 1 unless this reader is reading an animated image. Certain multi-image formats do not encode the total number of images. When reading images in those formats it may be necessary to repeatedly call read, incrementing the image index at each call, until an IndexOutOfBoundsException is thrown. The allowSearch parameter determines whether all images must be available at all times. When allowSearch is false, getNumImages will return -1 if the total number of images is unknown. Otherwise this method returns the number of images.


getImageMetadata

public javax.imageio.metadata.IIOMetadata getImageMetadata(int i)
Description copied from class: javax.imageio.ImageReader
Get the metadata associated with this image. If the reader is set to ignore metadata or does not support reading metadata, or if no metadata is available then null is returned.


getStreamMetadata

public javax.imageio.metadata.IIOMetadata getStreamMetadata()
                                                     throws java.io.IOException
Description copied from class: javax.imageio.ImageReader
Get the metadata associated with the image being read. If the reader is set to ignore metadata or does not support reading metadata, or if no metadata is available then null is returned. This method returns metadata associated with the entirety of the image data, whereas getImageMetadata(int) returns metadata associated with a frame within a multi-image data stream.


getImageTypes

public java.util.Iterator getImageTypes(int imageIndex)
                                 throws java.io.IOException
Description copied from class: javax.imageio.ImageReader
Get an iterator over the collection of image types into which this reader can decode image data. This method is guaranteed to return at least one valid image type specifier. The elements of the iterator should be ordered; the first element should be the most appropriate image type for this decoder, followed by the second-most appropriate, and so on.


getHeight

public int getHeight(int imageIndex)
              throws java.io.IOException
Description copied from class: javax.imageio.ImageReader
Get the height of the input image in pixels. If the input image is resizable then a default height is returned.


getWidth

public int getWidth(int imageIndex)
             throws java.io.IOException
Description copied from class: javax.imageio.ImageReader
Get the width of the input image in pixels. If the input image is resizable then a default width is returned.


setInput

public void setInput(java.lang.Object input,
                     boolean seekForwardOnly,
                     boolean ignoreMetadata)
Description copied from class: javax.imageio.ImageReader
Set the input source to the given object, specify whether this reader should be allowed to read input from the data stream more than once, and specify whether this reader should ignore metadata in the input stream. The input source must be set before many methods can be called on this reader. (see all ImageReader methods that throw IllegalStateException). If input is null then the current input source will be removed. Unless this reader has direct access with imaging hardware, input should be an ImageInputStream.


read

public java.awt.image.BufferedImage read(int imageIndex,
                                         javax.imageio.ImageReadParam param)
                                  throws java.io.IOException
Description copied from class: javax.imageio.ImageReader
Read the given frame into a buffered image using the given read parameters. Listeners will be notified of image loading progress and warnings.