Search code examples
iosobjective-cmemory-managementnsimagensimageview

iOS load resized image without losing quality


I am trying to load a scaled down version of an image without loading original sized image into memory. To reach this goal I was using ImageIO framework. However in this case I face unacceptable loss of quality.

This way I can re-size my image, however original size has to be loaded into memory.

Is there a way to get good quality lower resolution image without loading large image into memory?

Using apple libraries would be preferable, but if there is no other way, third-party library would also be acceptable.


Solution

  • May be Accelerate.framework can help. Use vImageScale_Planar8 to resize image. As I know, this framework supports tiling, probably it will reduce memory required.