Page 1 of 1
Resize no longer working
Posted: 2010-06-05T21:41:03-07:00
by jonlyb
Hi All,
I had some code in an application using PerlMagick which was working great. I ported it from RH 7.2 under Apache 1.3x to FreeBSD 8.0 under Apache 2.2, and upgraded from an older version of ImageMagic to 6.6.0-10. I'm able to use PerlMagick to read files and such, however the Resize function is now hanging up my script, grinding away until it finally dies with an apache error : "Timeout waiting for output from CGI script". Offending command here:
$x=$image->Resize(width=>$newwidth, height=>$newheight);
if ($x){print STDERR "HEY BAD ERROR: $x\n";}
The script never gets to print out the error as Resize hangs the script.
Any pointers on how to debug this would be appreciated.
Thanks!
Jon
Re: Resize no longer working
Posted: 2010-06-05T23:22:00-07:00
by fmw42
can you test under simple command line interface to see that IM was installed properly.
Re: Resize no longer working
Posted: 2010-06-06T00:48:12-07:00
by jonlyb
Yes, and that seems to work, but still the Resize function hangs my script under FreeBSD.
e.g. :
convert jontest.jpg -resize 50% jontest2.jpg
Works fine.
I can likewise issue the Crop() function with no problem from my perl script, but for some reason, Resize() bombs. The exact same code works fine under the older platform.
Thanks in advance.
Jon
Re: Resize no longer working
Posted: 2010-06-06T08:21:42-07:00
by jonlyb
OK. The fix for me appears to be changing out the function Resize() with AdaptiveResize():
$x=$image->Resize(width=>$newwidth, height=>$newheight); # No workie
$x=$image->AdaptiveResize(width=>$newwidth, height=>$newheight); # workie
Has Resize been deprecated or buggy in this version of ImageMagick/PerlMagick, or am I missing something?
I'm also running Perl v5.8.9
Thanks!
Jon
Re: Resize no longer working
Posted: 2010-06-06T19:54:21-07:00
by jonlyb
More info...I found other things that don't work within PerlMagick on my FreeBSD 8.0 system besides the Resize. Annotate() is likewise problematic.
It doesn't seem to be a problem with ImageMagick since most things work properly from the command line, but calling the Perl Module from a script causes alot of image manipulation functions to fail and hang the script.
For kicks I did a clean install of ImageMagick 6.6.0-10 from source and ran 'make test' against PerlMagic, which hung up during a composite test:
Code: Select all
cd /var/ports/distfiles/ImageMagick-6.6.0-10/PerlMagick
# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/bzlib/*.t t/fpx/*.t t/jbig/*.t t/jpeg/*.t t/jng/*.t t/jp2/*.t t/png/*.t t/tiff/*.t t/x11/*.t t/zlib/*.t
t/blob............ok
t/bzlib/read......ok
t/bzlib/write.....ok
t/composite.......^C
Typically I use portmaster and install from the ports, but those giving errors, so I installed ImageMagick from source. At first blush it seemed to work fine, but clearly there are issues.
Any suggestions?
Thanks!
Jon
Re: Resize no longer working
Posted: 2010-06-06T21:59:08-07:00
by jonlyb
And so in the end it was a botched installation after all.
I removed the source file install, and a half broken port install. Did a clean install of the port version 6.6.0 and all is right with the world again. Whew!
Jon