Dynamic resizing
Posted: 2010-09-29T13:51:25-07:00
I'm trying to resize an image based of the size of another image. So basically I have a the large image and need it to look at its smaller version and change its size to the smaller ones size. I know that the resize option can take parameters as the resize values but I don't know how to get the w and h of the smaller image while trying to resize the larger version.
So basically I want to look at a an image get its size and use it to resize the bigger version and since this will be done in a batch I need it to be at the same time. I was thinking something like this.
identify -format %%w%%h small/image.png (+convert big.png -resize %%wx%%h small/image.png)
Any help would be greatly appreciated. Also this is to port a image to a smaller resolution mobile device.
So basically I want to look at a an image get its size and use it to resize the bigger version and since this will be done in a batch I need it to be at the same time. I was thinking something like this.
identify -format %%w%%h small/image.png (+convert big.png -resize %%wx%%h small/image.png)
Any help would be greatly appreciated. Also this is to port a image to a smaller resolution mobile device.