On Tue, Aug 25, 2009 at 6:52 PM, naga raja<[email protected]> wrote:
> hi,
> 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:
>
> use Image::Magick;
>
> $image = Image::Magick->new;
>
> open(INPUT,"abc.jpg" )
> $image->Read( file=>\*INPUT);
> close INPUT;
>
> $image->resize( geometry=>'300x400', support=>'.2' );
>
> open( OUTPUT, "out.jpg" );
> $image->Write(file=>\*OUTPUT, filename=>'out.jpg');
> close( OUTPUT);
> undef $image;
>
> __END__
>
> 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,,

Okay now this is the best question I have read in ilugc in ages. ;)

And I should thank you for reminding me of this excellent program
though I had to
comment out the section  which did the "Segment" effect.

I am talking about this script.

http://www.imagemagick.org/source/examples.pl

And the bug in your program is that you are using 'resize' instead of 'Resize'.

Also a useful perl command is 'perl -c foo.pl'.

It is a compiler that will tell you about warnings and errors in the syntax.

People think that interpreted languages are never compiled. It is not true.

Perl is first compiled and then only interpreted. And every
interpreted language has to
work that way.

-Girish
-- 
Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com

r
_______________________________________________
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