Class 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(bmpBytes);
     

    Example 2 (Using File):

    
     GifDecoder decoder = new GifDecoder();
     BufferedImage decodedImage = decoder.read(bmpFile);
     
    • Constructor Summary

      Constructors 
      Constructor Description
      GifDecoder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage read​(byte[] gifData)
      Decodes and returns the gif image as a BufferedImage from bytes
      java.awt.image.BufferedImage read​(java.io.File gifFile)
      Decodes and returns the gif image as a BufferedImage from file
      • Methods inherited from class com.idrsolutions.image.JDeliImage

        optimiseImage
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.idrsolutions.image.Decoder

        getImageCount, readImageAt, setMetadata
    • Constructor Detail

      • GifDecoder

        public GifDecoder()
    • Method Detail

      • read

        public java.awt.image.BufferedImage read​(byte[] gifData)
                                          throws java.io.IOException
        Decodes and returns the gif image as a BufferedImage from bytes
        Specified by:
        read in interface com.idrsolutions.image.Decoder
        Parameters:
        gifData - gif image as data bytes
        Returns:
        BufferedImage The decoded image
        Throws:
        java.io.IOException
      • read

        public java.awt.image.BufferedImage read​(java.io.File gifFile)
                                          throws java.io.IOException
        Decodes and returns the gif image as a BufferedImage from file
        Specified by:
        read in interface com.idrsolutions.image.Decoder
        Parameters:
        gifFile -
        Returns:
        BufferedImage The decoded image
        Throws:
        java.io.IOException