Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have number of images with alpha layer, with different size and aspect ratio. I need to bring them to one size(say 150x150) with maximum possible dimensions keeping alpha and aspect ration. For example - if image is 1500x1000 - then it should be downscaled to 150x100, vertically centered and empty 25px on the top and bottom should be filled with white color. If image is 1000x1500 - then it will be downscaled to 100x150, horizontally centered and empty pixels on the left and right filled with white.

Any tools for this( win or linux)? Thanks

share|improve this question

migrated from serverfault.com May 12 '11 at 13:55

This question came from our site for system and network administrators.

This is quite off-topic for SF, but you're looking for something like imagemagick. –  jscott May 12 '11 at 13:41

3 Answers 3

You can use ImageMagick for this sort of conversion, resizing, fill, and much more

The convert tool/command, which is a part of ImageMagick tools, supports -resize, -fill, etc options.

Below are a few links for ImageMagick commands and tutorial:

share|improve this answer

Imageresize (Free, requires python)
Shrinks specified images so that the largest dimension is SIZE. Images who's largest dimension is already smaller or equal to SIZE are not touched (unless -f is given.) Images may be any format that is handled by the Python Imaging Library (PIL).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.