BenRussell
Programmer
I am trying to read a file (that I know exists and is readable, called 'EXISTING_IMAGE.jpg') and then simply print it back out to the browser via a Perl script. I am using the following code:
However, it returns a broken image, and $return returns nothing.
- Ben
Code:
print "Content-type: image/gif\n\n";
# Read the image
$image->Read("EXISTING_IMAGE.jpg");
# Resize the image
$image->Resize(
width => '200',
height => '100'
);
# Save the image
my $return = $image->Write('gif:-');
However, it returns a broken image, and $return returns nothing.
- Ben