Mac usage: Run from MacPerl. Or: save as a droplet, then you can drop files onto it. The output modes are:
Requirements: You will need a copy of a perl compiler/interpreter; Perl4, or Perl5, or the MacPerl flavors of these, will work fine. It will also help if you have at least skimmed the GIF standards documents:
Bugs: in the current version there are no known bugs; but email me if you find any. I've tested this program on hundreds of different gifs over the course of more than a year, and it seems entirely stable now.
If there are any bugs, they will most likely be in the handling of really obscure GIF options, like pixel aspect ratios, which I've never seen used and thus cannot test for the correct implementation of.
There may be cosmetic bugs here and there.
Caveat: Daktari GIF will not display GIF data. It considers the LZW-compressed image data as opaque, and just skips it.
Caveat: Daktari GIF does not attempt to interpret the Application Control Blocks, which is where some additional functionality might be stored (e.g., I think the "how many times to loop this image" information is in a control block).
I want to explain this figure means: efficiency of 100% is basically impossible, but you can come close; efficiency of, say, 90% means (roughly) that the image data in a GIF takes up 10% of the space it would take up if it weren't compressed.
Efficiencies of 0% mean that compression was useless (not that you can turn it off or anything).
Efficiencies of less than 0% (e.g., -10%) mean that the GIF file is larger than just the uncompressed image data would be. This can happen from time to time because of overhead if GIFs because of palette declarations, extension blocks, etc.
If you want to get into the technicalities of how I arrive at these figures, just read the source.
list_gif_comments
.
If you want to write a comment into a GIF, see my program
add_gif_comment
.
GIF comments are part of the GIF89a standard (altho they will not break GIF87 readers). Some GIF viewers ignore them (e.g., Lview, last I saw), and some display them for you in varying degrees of usefulness and accessability (e.g., JPEGView, Graphic Converter, GIFCON, GifBuilder, Netscape). Netscape (at least 3.x and later versions; I don't know what earlier versions do) will show the contents of a GIF's comments if you view the "about:" (AKA "Document Info") for the given image. E.g., lookit this image and select "Document Info". The comment you see should be "it's sparkly and wonderful!".
dr_gif_80g.pl
--
about 15 K.
Daktari GIF is released under the GNU Public License:
Daktari GIF is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
Daktari GIF is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
To see a copy of the GNU General Public License, see http://www.ling.nwu.edu/~sburke/gnu_release.html or write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.