|
Abstract: There exists a very cool program from Martin Gleeson called Fly, a small tool that can generate gif images - you guessed it - on the fly. The commands used to generate them are very simple, and this can be used to powerful effect. I went to the small trouble of downloading and installing fly on OSXS and thought I'd save others the trouble of debugging the install, as well as offering up the modest executable file for download. A very small contribution to OSXS-land, but every bit helps. (This works both on OS X Server and on OS X Public Beta / Darwin.) |
Down at the bottom of this article, you can simply download the executable binary of "fly" that I've compiled for OSXS. I'll go ahead and show you how to compile it, however, as you may want to compile the latest version on your own, or otherwise toy with the compilation process.
This takes only a few minutes to follow these steps, so copy and paste away. (Don't try to do more than one line at a time.) This is a compilation of fly 1.6.5, so if you're reading this article in the future, and there's a new version out, adjust the lines accordingly.
mkdir temp; cd temp wget ftp://www.unimelb.edu.au/pub/www/tools/unix/fly/fly-1.6.5.tar.gz gnutar -zxf fly-1.6.5.tar.gz cd fly-1.6.5/gd1.3 cp Makefile Makefile.temp1 sed "s/\-lm//" Makefile.temp1 > Makefile.temp2 sed "s/gcc/cc/" Makefile.temp2 > Makefile.temp3 head -n28 Makefile.temp3 > Makefile printf "\tranlib libgd.a\n" >> Makefile tail -n7 Makefile.temp3 >> Makefile cd .. cp Makefile Makefile.temp1 sed "s/\-lm//" Makefile.temp1 > Makefile.temp2 sed "s/gcc/cc/" Makefile.temp2 > Makefile make |
The program "fly" should now appear in this directory. To test fly out to see if it really worked, there are a few examples in the "examples" directory. Here's the first thing to try (note- if typing in "which perl" gets you this response: "/usr/bin/perl", like most osxs machines, then make use of the 2nd line below, otherwise you may have to go into "perl.example" and tell it where perl is):
cd examples sed "s/usr\/local/usr/" perl.example > perl.example.new perl perl.example.new |
Then check out "temp.gif", in OmniWeb or by typing "open temp.gif" , and you should see your first fly graphic. If it's working, you're on your way. Go to the Fly website for further instructions on how to write fly instructions for creating gifs to your heart's delight. For one other quick example, that produces many small images and a graphic called "testing.gif", give this a whirl:
../fly -i test.fly -o testing.gif |
Lastly, put the fly program in a proper location for future use. Me, I like to keep it some place where "which" can find it. (If you're not root already, "su" to root.)
cd .. cp fly /usr/local/bin/ |
So, there you have it. Have fun. And, for those who need it, or those who jumped straight to the bottom for it, here's a gzipped executable of what was made above:
fly.gz (29k)
As a quick example of a program that makes use of fly, there's aWebVisit-Map by Michel Dalle, which I've got happily running on my OSXS box.
Hope this was of use to anyone out there. -Jeff
fly is copyright 1995-1999, Martin Gleeson and The University of Melbourne. Permission is granted to copy and distribute this work free of charge provided that this notice remains intact. Credit for using this program must be given to both The University of Melbourne and the Quest Protein Database Center, Cold Spring Harbor Labs (for gd), in all derived works. This does not affect your ownership of the derived work itself, and the intent is to assure proper credit for The University of Melbourne and Quest, not to interfere with your use of fly or gd.