Java Glossary : GIF

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 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

You are here : home : Java Glossary : G words : GIF.

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 is it violates a patent held by Unisys who have done some sabre rattling demanding people stop using the format, but seemed to have calmed down again given the impossibility of prosecuting everyone using GIF files on their websites. Their patent on the compression used in GIF ran out 2003 June, in the USA. It drags on longer in other countries. You may display uncompressed GIF files without restriction, and you can even make them for commercial purposes without restriction. What you cannot do is make commercial compressed GIF files without directly or indirectly paying a royalty. What keeps GIF files alive (even though PNG is superior in every way) is a feature that Netscape added to them several years back -- animation. Animated GIFs contain several images that are displayed in rotation to create a simple repetitive animation. Java does not yet have support for animated GIFs. You have 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 logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 1496.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/gif.html J:\mindprod\jgloss\gif.html