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'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
add comment

1 Answer

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:
http://www.imagemagick.org/Usage/resize/#space_fill

share|improve this answer
add comment

Your Answer

 
discard

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.