Class GifEncoder

java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.gif.GifEncoder
All Implemented Interfaces:
com.idrsolutions.image.Encoder

public class GifEncoder extends com.idrsolutions.image.JDeliImage implements com.idrsolutions.image.Encoder
Class writes BufferedImages as GIF Example:

 GifEncoder encoder = new GifEncoder();
 encoder.write(image, outputStream);
 
  • Constructor Details

    • GifEncoder

      public GifEncoder(EncoderOptions format)
    • GifEncoder

      public GifEncoder()
  • Method Details

    • getEncoderOptions

      public GifEncoderOptions getEncoderOptions()
    • write

      public void write(BufferedImage image, OutputStream outputStream) throws IOException
      Writes BufferedImage as a GIF into an OutputStream

      This method does not close the provided OutputStream after the write operation has completed; it is the responsibility of the caller to close the stream.

      Specified by:
      write in interface com.idrsolutions.image.Encoder
      Parameters:
      image - BufferedImage to write
      outputStream - The stream to write the image to
      Throws:
      IOException - if the image wasn't written