Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create thumbnails of JPG photos using ImageMagick's convert tool. The thumbnails need to have a defined size (210x159), no blank areas, and the image can be cropped if necessary.

Unfortunately, I only have ImageMagick 6.3.7 available, which doesn't support the '^' geometry modifier (added in v6.3.8-3). Is there another way to achieve this in earlier versions of ImageMagick?

share|improve this question

I found a description of how to simulate '^' with older ImageMagic versions. It's not perfect, because the original will be resized 2-3 times, which obviously has the potential to add artifacts and blurring, but it appears to solve the problem.

convert logo: \
        -resize x160 -resize '160x<'   -resize 50% \
        -gravity center  -crop 80x80+0+0 +repage  space_fill.jpg

Here's a rather thorough description of what exactly this does:

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.