This is more of a thank-you note than a cool use for perl. But since I think it IS cool, here we go:
With the help of httptech, mdillon, chromatic, Corion and others (the list gets long), I managed to unpack image files in hex mode, and embed them directly into a perl script. This will allow me to build a self-sufficient script, without the need for extra image files in HTML, and make it as simple as can be to install the script on any server. All you have to do, is upload one file, chmod it, and its ready to go. When the script is called with a ?img=foo it re-packs the image and sends it back to the client. There are a few obvious downsides to this, but for small scripts, small images, I think its a pretty clever way to be user friendly.
So, without further ado, you can get the source at http://johnny.warp.psi.br/images.txt, and you can see the ouput images (all shamelessly "borrowed" from Apache) here, here, here and here!
Thanks again everyone! I had a great time learning on this one. Peers are the best teachers.
With the help of httptech, mdillon, chromatic, Corion and others (the list gets long), I managed to unpack image files in hex mode, and embed them directly into a perl script. This will allow me to build a self-sufficient script, without the need for extra image files in HTML, and make it as simple as can be to install the script on any server. All you have to do, is upload one file, chmod it, and its ready to go. When the script is called with a ?img=foo it re-packs the image and sends it back to the client. There are a few obvious downsides to this, but for small scripts, small images, I think its a pretty clever way to be user friendly.
So, without further ado, you can get the source at http://johnny.warp.psi.br/images.txt, and you can see the ouput images (all shamelessly "borrowed" from Apache) here, here, here and here!
Thanks again everyone! I had a great time learning on this one. Peers are the best teachers.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Hex Embedded Images
by epoptai (Curate) on Dec 22, 2000 at 04:09 UTC | |
by BBQ (Curate) on Dec 23, 2000 at 08:51 UTC | |
RE: Hex Embedded Images (5.004 is different)
by ybiC (Prior) on Jun 28, 2000 at 11:02 UTC | |
by BBQ (Curate) on Jun 28, 2000 at 18:44 UTC | |
by ybiC (Prior) on Jun 28, 2000 at 20:48 UTC | |
by btrott (Parson) on Jun 28, 2000 at 22:24 UTC |
Back to
Cool Uses for Perl