in reply to Returning jpg works, png NOT
#!/usr/bin/perl use strict; print "Content-type: image/jpg\n\n"; my $file_name = "/path/to/picture.jpg"; my $buff; binmode IMAGE; binmode STDOUT; open IMAGE, $file_name or die "ERROR $!"; while(read IMAGE, $buff, 1024) { print STDOUT $buff; } close IMAGE; 1;
|
|---|