Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
/ android-gif-encoder Public archive

An animated GIF encoder for Android, without any native code required. Based on the J2ME encoder by Alessandro La Rosa with the addition of dirty rectangle support.

Notifications You must be signed in to change notification settings

nbadal/android-gif-encoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

⚠️ ARCHIVED / UNMAINTANED

Archived / Unmaintained: This project was originally published in 2008 as a small Android-compatible adaptation of an existing Java GIF encoder, at a time when GitHub did not yet have features like Gist. As of 2026, it is roughly 18 years old, unmaintained, and has now been marked archived and read-only to preserve it as a historical reference.

For a modern maintained library, check this out instead:


android-gif-encoder

An animated GIF encoder for Android, without any native code required. Based on the J2ME encoder posted here: http://www.jappit.com/blog/2008/12/04/j2me-animated-gif-encoder/ with the addition of dirty rectangle support.

Example usage:

public byte[] generateGIF() {
    ArrayList<Bitmap> bitmaps = adapter.getBitmapArray();
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    AnimatedGifEncoder encoder = new AnimatedGifEncoder();
    encoder.start(bos);
    for (Bitmap bitmap : bitmaps) {
        encoder.addFrame(bitmap);
    }
    encoder.finish();
    return bos.toByteArray();
}

public void saveGif() {
    try {
        FileOutputStream outStream = new FileOutputStream("/sdcard/test.gif");
        outStream.write(generateGIF());
        outStream.close();
    } catch(Exception e) {
        e.printStackTrace();
    }
}

About

An animated GIF encoder for Android, without any native code required. Based on the J2ME encoder by Alessandro La Rosa with the addition of dirty rectangle support.

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages