Advertisement

08.28.2007 at 12:44PM PDT, ID: 22792584
[x]
Attachment Details

ImageMagick resize images

Asked by jmingo in Perl Programming Language

Tags: resize, image, imagemagick

I'd like to resize images proportionally. so i want it to grab the width and hight and for example shrink the width to 150 and the height to shrink proportionally to the width.

This is all i have right now, i know the function is 'resize' but that's it.

        my $img = Image::Magick->new;       
      $img->Read('old.jpg');
        my ($w,$h) = $img->Get('width','height'); # find dimensions
      
        #resize code

      $img->Write('new.jpg');

ThanksStart Free Trial
[+][-]09.02.2007 at 08:19PM PDT, ID: 19818906

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: resize, image, imagemagick
Sign Up Now!
Solution Provided By: clockwatcher
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.04.2007 at 06:57AM PDT, ID: 19825166

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.04.2007 at 09:41AM PDT, ID: 19826446

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.04.2007 at 10:21AM PDT, ID: 19826739

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628