Hi.
First check that you are trying to print out the appropriate file type...meaning if you are using this script on a jpg you need to change this:
"Content-type: image/gif\n\n"
To:
"Content-type: image/jpg\n\n"
Otherwise you might want to try changing this line:
while (<IMG> ) { print;}
to
while (<IMG> ) { print $_;}
I think this might work...
What Pasha is suggesting will not work because you've already print a Content-type header. Though his idea will work if you take out the "Content-type: image/gif\n\n"
It doesn't read in your image first before displaying it!
Hope this helps
Rod