in reply to How can I use a CGI script to return an image?
or, faster and easier:open IMAGE, "/path/to/image.jpg"; #assume is a jpeg... my ($image, $buff); while(read IMAGE, $buff, 1024) { $image .= $buff; } close IMAGE; print "Content-type: image/jpeg\n\n"; print $image;
use File::Copy; print "Content-type: image/jpeg\n\n"; copy "/path/to/image.jpeg", \*STDOUT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Answer: How can I use a CGI script to return an image?
by merlyn (Sage) on Sep 07, 2000 at 16:51 UTC | |
|
RE: Answer: How can I use a CGI script to return an image?
by Jouke (Curate) on Sep 07, 2000 at 15:29 UTC |