gif : Java Glossary
home G words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish 2007-07-25 by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
gif
A file format Java uses primarily for icons. Such files usually have a *.gif extension. They are superior to JPEG files for line art, though JPEG is better for photographs. *.gifs allow transparent backgrounds where JPEGs 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 JDK 1.6 when the *.gif patents expired.

The Unisys patent on the LZW 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 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
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] The information on this page is for non-military use only.
You are visitor number 15,174. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/gif.html J:\mindprod\jgloss\gif.html