GIF Writer : GIF « 2D Graphics GUI « Java






GIF Writer

    

import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;

public class ImageConverterGIF {
  public static void main(String[] args) throws Exception {
    String imageFilePath = "C:/myBmp.bmp";
    String gifFilePath = "C:/myPic.gif";
    File inputFile = new File(imageFilePath);
    BufferedImage image = ImageIO.read(inputFile);
    File outputFile = new File(gifFilePath);
    ImageIO.write(image, "GIF", outputFile);
  }
}

          
    
    
  








Related examples in the same category

1.Class for converting images to GIF files
2.Animated Gif Encoder
3.Gif file Encoder
4.Gif Encoder
5.GIFEncoder is a class which takes an image and saves it to a stream using the GIF file format
6.AnimatedGifEncoder - Encodes a GIF file consisting of one or more frames
7.Converting GIF to PostScript
8.Decodes a GIF file into one or more frames
9.Gif Encoder implements ImageConsumer
10.Hide the mouse cursor: use a transparent GIF as the cursor
11.Get Gif Properties
12.Gif Encoder - writes out an image as a GIF.