[英]How to resize a image by it's width and Maintain Aspect Ratio
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. 我一直在整个网络中搜索,这是通过指定新的CGSize值将图像调整为新大小。 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. 我只想按固定的宽度将其缩小,例如100px,将高度缩小并保持其宽高比。
check this out and modify as per your needs. 请检查并根据您的需要进行修改。
http://code.developwithus.com/iphone/resize-image-in-iphone-sdk/ http://code.developwithus.com/iphone/resize-image-in-iphone-sdk/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.