gif : Java Glossary

gif
GIF (Graphic Interchange Format). A file format Java uses primarily for icons. Such files usually have a *.gif extension. They are superior to JPEG (Joint Photographic Experts Group) files for line art, though JPEG is better for photographs. *.gifs allow transparent backgrounds where JPEGs (Joint Photographic Experts Groups) do not. *.gif format was originated by Compuserve. The problem was it violated a patent held by Unisys who did done some sabre rattling demanding people stop using the format. Java has always supported *.gif files for display, though a GIFEncoder to create *.gif files did not appear until Java version 1.6 when the *.gif patents expired.

The Unisys patent on the LZW (Lempel—Ziv—Welch) compression used in *.gif ran out 2003-06-20 in the USA. It dragged on longer in other countries. The counterpart patents in the United Kingdom, France, Germany and Italy expired on 2004-06-18, the Japanese counterpart patents expired on 2004-06-20 and the counterpart Canadian patent expired on 2004-07-07. Consequently, while Unisys has further patents and patent applications relating to improvements to the LZW technique, the *.gif format may now be used freely.

You may display uncompressed *.gif files without restriction, and you can even make them for commercial purposes without restriction. What in former times you could not do is make commercial compressed *.gif files without directly or indirectly paying a royalty. What keeps *.gif files alive (even though *.png format is superior in every way) is a feature that Netscape added to them — animation. Animated *.gifs contain several images that are displayed in rotation to create a simple repetitive animation. Starting in JDK (Java Development Kit) 1.6 Java has support for animated *.gifs. Pritor to that, you had to take the *.gifs apart yourself and animate them manually.

The format of the *.gif file header is as follows:

signature *.gif 3 bytes
version 87a or 89a 3 bytes
width in pixels 2 bytes unsigned binary little endian
height in pixels 2 bytes unsigned binary little endian

CMP homejump to top

available on the web at:

http://mindprod.com/jgloss/gif.html
  

optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\gif.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, especially when sending an ad-hominem attack, a rant composed mainly of obscenities or a death threat, please quote the offending passage and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. I can’t very well fix erroneous or ambiguous text if I can’t find it.
Blog
IP:[65.110.21.43]
Your face IP:[54.234.67.55]
You are visitor number 25,862.