How can I resize to fixed dimensions?
Posted: 2013-05-07T18:11:05-07:00
Hello,
I searched a lot and I couldn't figure out how to achieve the following:
I have a news aggregation service so I am getting images of various dimensions. I have to create a 3 versions of the aggregated story image:
50x50, 150x100 and 278x209.
The dimensions must be absolutely what's mentioned above.
I currently have this:
But sometimes my specified dimensions are not being strictly adhere to, I don't know why.
I don't want to end up with deformed images either if I prevent images from scaling proportionally.
What are my options?
Your help would be appreciated.
I searched a lot and I couldn't figure out how to achieve the following:
I have a news aggregation service so I am getting images of various dimensions. I have to create a 3 versions of the aggregated story image:
50x50, 150x100 and 278x209.
The dimensions must be absolutely what's mentioned above.
I currently have this:
Code: Select all
convert {input} -resize {dimensions} {output}
I don't want to end up with deformed images either if I prevent images from scaling proportionally.
What are my options?
Your help would be appreciated.