I have a bunch of screenshots of websites. I need to display thumbnails of each site on a page, so I've been re-sizing them using convert 6.6.9 like this:
convert -trim -thumbnail "200x200>" $name.png $name.thumb.png
This works fine for most images, and fit everything into a 200x200 space. However, some of the websites have very long pages, so they show up as very narrow thumbnails inside the 200px height.
I'd like to keep all the thumbnails the same width, and cut any off if they extend more than, say, 300px in height. I do need to preserve the aspect ratio though.
I've tried the following, but it doesn't seem to work in the way I expect, since it only seems to work on some of the larger images but not others:
convert $name.png -resize "200" -gravity north -crop 200x300+0+0 +repage $name.thumb.png
I think I'm misunderstanding something...