Package com.idrsolutions.image.gif
Class GifDecoder
java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.gif.GifDecoder
- All Implemented Interfaces:
- com.idrsolutions.image.Decoder
public class GifDecoder
extends com.idrsolutions.image.JDeliImage
implements com.idrsolutions.image.Decoder
Class reads Gif image as BufferedImage
 
Example 1 (Using raw byte data):
 GifDecoder decoder = new GifDecoder();
 BufferedImage decodedImage = decoder.read(gifBytes);
 Example 2 (Using File):
 GifDecoder decoder = new GifDecoder();
 BufferedImage decodedImage = decoder.read(gifFile);
 - 
Field SummaryFields inherited from class com.idrsolutions.image.JDeliImagebb
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionread(byte[] gifData) Decodes and returns the gif image as a BufferedImage from bytesDecodes and returns the gif image as a BufferedImage from filereadDimension(byte[] gifData) Decodes and returns the width and height of gif imagereadDimension(File gifFile) Decodes and returns the width and height of gif imageMethods inherited from class com.idrsolutions.image.JDeliImageoptimiseImageMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.idrsolutions.image.DecodergetImageCount, getImageCount, readEmbeddedThumbnail, readEmbeddedThumbnail, readImageAt, readImageAt, readImageSpecificMetaData, readImageSpecificMetaData, setMetadata
- 
Constructor Details- 
GifDecoderpublic GifDecoder()
 
- 
- 
Method Details- 
readDecodes and returns the gif image as a BufferedImage from bytes- Specified by:
- readin interface- com.idrsolutions.image.Decoder
- Parameters:
- gifData- gif image as data bytes
- Returns:
- BufferedImage The decoded image
- Throws:
- IOException- if an error occurs in reading image
 
- 
readDecodes and returns the gif image as a BufferedImage from file- Specified by:
- readin interface- com.idrsolutions.image.Decoder
- Parameters:
- gifFile- Path to gif image to be read
- Returns:
- BufferedImage The decoded image
- Throws:
- IOException- if an error occurs in reading image
 
- 
readDimensionDecodes and returns the width and height of gif image- Specified by:
- readDimensionin interface- com.idrsolutions.image.Decoder
- Parameters:
- gifFile- image image contained in raw data if present
- Returns:
- width and height of image
- Throws:
- IOException- if problem reading image
 
- 
readDimensionDecodes and returns the width and height of gif image- Specified by:
- readDimensionin interface- com.idrsolutions.image.Decoder
- Parameters:
- gifData- image image contained in raw data if present
- Returns:
- Rectangle width and height of image
- Throws:
- IOException- if problem reading image
 
 
-