Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 223557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:13:57+00:00 2026-05-11T19:13:57+00:00

From command line with imagemagick, you can use: convert dragon.gif -resize 64×64^ -gravity center

  • 0

From command line with imagemagick, you can use:

convert dragon.gif -resize 64x64^ -gravity center -extent 64x64 fill_crop_dragon.gif

to resize and then crop an image so that it fills the area as much as possible.

How do I do this from Perl’s Image::Magick?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:13:57+00:00Added an answer on May 11, 2026 at 7:13 pm
    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    use Image::Magick;
    
    my $image = Image::Magick->new;
    $image->read('test.jpg');
    
    $image->Set( Gravity => 'Center' );
    $image->Resize( geometry => '64x64' );
    $image->Extent( geometry => '64x64' );
    $image->Write( 'test-out.jpg' );
    

    See the PerlMagick documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can you use imagemagick from python without opening a new command line window
I'm using ImageMagick from the command line to resize images: convert -size 320x240 image.jpg
I have to use imagemagick convert command from php. So I'm using shell_exec but
Can Eclipse Compare tool be called from command line? I just want to use
Is there anyway we can take input from command line in Objective-C, the way
I'm trying to use tesseract from command line to run OCR on the content
I can run an svn command from the command line but not from within
How can I detect Debug or Release mode from command line pre-build or post-build
I have one spring batch application which can be run from command line. The
How can I run excel from command line / cmd script such that it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.