On Tue, Aug 25, 2009 at 6:52 PM, naga raja <[email protected]> wrote:
> I am using PerlMagick to automate image resizing and resampling. The
> problem is that every time I try to use one of the Image::Magick
> functions, Perl crashes. Here is an example of the code I am trying to
> run:

Which Linux distro, Perl and PerlMatick versions are you using?


use strict;        # these two are necessary if you want to avoid
use warnings;    # weired bugs like yours

> use Image::Magick;
>
> $image = Image::Magick->new;
>
> open(INPUT,"abc.jpg" )
> $image->Read( file=>\*INPUT);
> close INPUT;

Don't bother with file handles, just pass the filename and let
perl do the rest with the Read/Write methods.


> When run, this code causes a "Perl Command Line Interpreter has
> encountered a problem and needs to close" window
> and terminal get struct ,then I force Quit the program,,

Run "perl -d foo.pl" for debug mode.  You can step
through the code and identify where exactly it's failing.

- Raja
_______________________________________________
To unsubscribe, email [email protected] with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to