Resize CGImage

Benefits of resizing image with CG Image

I resized a 1920 * 1038 image to 6000 * 6000 on my iPhone 11.

Original jpeg.

CIImage is faster in processing speed, but CGImage has less memory usage.
By the way, the memory usage was small even in the image composition process.

The memory usage is just by looking at the memory of the debugger, but
if you want to reduce the memory usage, it is better to use CGImage, I think.

As for the image quality, UIImage was the best, and CIImage and CGImage looked about the same.

CGImage CIImage UIImage

CGImage
CIImage
UIImage

Resize method

🐣

I’m a freelance engineer.
Work consultation
Please feel free to contact us with a brief development description.
rockyshikoku@gmail.com

I am making an app that uses Core ML and ARKit.
We send machine learning / AR related information.

GitHub

Twitter
Medium

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store