Thanks for wanting to help.
I've got something similar to yourcode. The routines are already proven on my old running server.
The only difference between my code and yours is the image I fetch remains in memory; so I do a blobToImage convert on the fetched data before pushing it out.
Code:
use LWP::UserAgent;
use CGI;
use HTTP::Cookies;
use CGI::Carp qw/fatalsToBrowser/;
use strict;
use Image::Magick
[snip]
if ($secres->is_success) {
print $query->header(-type => 'image/gif', -expires => 'now');
binmode STDOUT, ":raw";
my $image=Image::Magick->new(magick=>'gif');
$image->BlobToImage($secres->{'_content'});
$image->Threshold(threshold=>'60%');
$image->Quantize(colors=>'8');
$image->Sharpen(0.0x1.0);
$image->Write('gif:-');
}
else {
# bail out gracefully...
[snip]
I can get the routine to work by doing
Code:
if ($secres->is_success) {
print $query->header(-type => 'image/gif', -expires => 'now');
binmode STDOUT, "raw:";
print $secres->{'_content'};
}
But I really need ImageMagick for its resizing and optimizations.
And I say, it all runs from the command line just fine. I'm really mystified.
Recent comments
1 day 23 hours ago
2 days 8 hours ago
2 days 10 hours ago
2 days 12 hours ago
2 days 13 hours ago
2 days 15 hours ago
2 days 16 hours ago
2 days 17 hours ago
3 days 9 hours ago
3 days 10 hours ago