Java ImageIO and GIF

I'm working on a project where users can upload images in JPEG, PNG and GIF formats and we resize the images using Java's built-in ImageIO API. Unfotunately, there's some confusing issues with GIF support. Using Java 1.5, GIF images can easily be read, but writing GIFs is not supported. This apparently has to do with CompuServe's patent on the GIF format.

The good news is that the patent recently ran out, so we can now freely write images to GIF format with ImageIO.

We have two simple options to make this work--either upgrade our project to Java 1.6 or include a plugin JAR that adds GIF support (for example com.sun.imageio.plugins.gif for Java 1.4 and above).

References:


As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles