Hi. I'm trying to get a basic image resizing functionality in a script I'm writing. I have the following code so far;
use Image::Magick;
use CGI::Carp qw(fatalsToBrowser);
use CGI;
$IN = new CGI;
my $ReadImage = "/home/linkssql/public_html/dev/6/86-Payments-small.gif";
my $WriteImage = "/home/linkssql/public_html/dev/6/smaller-Payments.gif";
my($image, $x);
$image = Image::Magick->new;
$image->Read($ReadImage) || die "1: $! ";
$image->Scale(geometry=>$_PercentageSmaller) || die "2: $! ";
$image->Write(filename=>$WriteImage) || die "3: $! ";
print $IN->header();
print "done";
However, when running this it gives a 500 IS Error (via browser), or the following error message via SSH;
perl: constitute.c:2015: ReadImage: Assertion `image_info->signature == 0xabacadab' failed.
Aborted
jailshell-2.05a$
Is this a boo-boo in the install/configuration of Image::Magick, or my script?
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Code:
#!/usr/bin/perl use Image::Magick;
use CGI::Carp qw(fatalsToBrowser);
use CGI;
$IN = new CGI;
my $ReadImage = "/home/linkssql/public_html/dev/6/86-Payments-small.gif";
my $WriteImage = "/home/linkssql/public_html/dev/6/smaller-Payments.gif";
my($image, $x);
$image = Image::Magick->new;
$image->Read($ReadImage) || die "1: $! ";
$image->Scale(geometry=>$_PercentageSmaller) || die "2: $! ";
$image->Write(filename=>$WriteImage) || die "3: $! ";
print $IN->header();
print "done";
However, when running this it gives a 500 IS Error (via browser), or the following error message via SSH;
Quote:
jailshell-2.05a$ perl test.cgi perl: constitute.c:2015: ReadImage: Assertion `image_info->signature == 0xabacadab' failed.
Aborted
jailshell-2.05a$
Is this a boo-boo in the install/configuration of Image::Magick, or my script?
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

