Any code/library to scale down an UIImage?

后端 未结 4 482
北荒
北荒 2021-01-01 04:43

Is there any code or library out there that can help me scale down an image? If you take a picture with the iPhone, it is something like 2000x1000 pixels which is not very n

4条回答
  •  余生分开走
    2021-01-01 05:05

    See http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/ - this has a set of code you can download as well as some descriptions.

    If speed is a worry, you can experiment with using CGContextSetInterpolationQuality to set a lower interpolation quality than the default.

提交回复
热议问题