[Ilugc] .a-tip-a-day. (convert - resize image to any dimension)

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Wed Nov 18 06:34:11 2009

$ convert foo.jpg -resize 80% resized.jpg

will get you a smaller image.

You could also do this.

$ convert photograph.png -resize 1024x768 o.jpg

Yes, convert is very smart.

But what to do when you do not wish to preserve the aspect ratio of the image?

The image will get distorted but sometimes I want that.

I know it is bad but I want it!

I was looking around for  a very long time and then Bingo!

$ convert image.jpg -resize \!123x80 distorted.jpg

If you prefix with an exclamation mark convert will give you what you ask.

I get reminded of Oscar Wilde.

"When God wishes to punish, he answers the prayers of men."

-Girish

-- 
Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com

Other related posts:

  • » [Ilugc] .a-tip-a-day. (convert - resize image to any dimension) - Girish Venkatachalam