Imagemagick: Create thumbnail of restricted width, but any height

0

2

To create a thumbnail from an image file, you can run the following ImageMagick command: convert -strip -thumbnail 600x600> filename.png.

However, I am in a situation in which I want to limit how wide an image is, but the height is not restricted.

How can I instruct ImageMagick to resize larger images to a specific width, without restricting the height?

Qqwy

Posted 2017-04-10T14:32:00.507

Reputation: 4 127

Answers

1

I'm not sure if this is what you want, but you can specify just a width to change only images wider than that value:

convert -strip -thumbnail '600x>' filename.png out.png

meuh

Posted 2017-04-10T14:32:00.507

Reputation: 4 273

This is indeed exactly what I was looking for :-) – Qqwy – 2017-04-10T19:05:19.480