0
votes

I want to resize or scale a image down by it's width is fixed. I have been searching all over the network, it's about resizing the image to new size by specifying new CGSize value. I only want to scale it down by its width is fixed, like 100px, and the height scale down and Maintain it's Aspect Ratio.

1
Can u add some code of what you have tried? - AnaMaria
Calculating the new height, given width and preserving aspect ratio is trivial; just do it. CGSize newSize = CGSizeMake(newWidth, ceil(newWidth * oldHeight / oldWidth)); - ipmcc

1 Answers