What is the most memory-efficient way of downscaling images on iOS?

前端 未结 6 2074
后悔当初
后悔当初 2021-01-31 19:18

In background thread, my application needs to read images from disk, downscale them to the size of screen (1024x768 or 2048x1536) and save them back to disk. Original images are

6条回答
  •  孤街浪徒
    2021-01-31 19:43

    While I can't definetly say it will help, I think it's worth trying to push the work to the GPU. You can either do that yourself by rendering a textured quad at a given size, or by using GPUImage and its resizing capabilities. While it has some texture size limitations on older devices, it should have much better performance than CPU based solution

提交回复
热议问题