Originally posted by Amit Shanker:
Hi Gregg,
You are right. I have not worded my question correctly. Actually, I want to crop an image to get the aspect ratio I want.
If the original aspect ratio of image is 2 ( 200 x 100 pixels image size), I may want to crop the image to get the aspect ratio of 1 (100 x 100 pixels image size) reducing 50 pixels on either sides.
Hope I'm clear this time.
Thanks,
Amit.
Interesting, because going from a 200px x 100px to a 100px x 100px is not keeping the aspect ratio. You are turning a rectangle into a square. If your image has a larger width than height, then resizing the image and keeping the aspect ratio will always leave a width greater than the height.
On the other hand, if you want to completely chop off 100px off the width (this would be cropping) but the image is not really being resized, then that would be different. In this case, ratio does not come into play at all.