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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!