CGImage
CGImage is a Core Graphics image object that represents an immutable bitmap image within Apple's Quartz 2D framework. In C it is known as CGImageRef, and in Swift it is exposed as CGImage. A CGImage provides access to the image’s pixel data as well as the metadata that describes how that data should be interpreted by a graphics context.
A CGImage encapsulates key properties of the image, including width, height, bits per component, bits per pixel,
Creation and sources: CGImage objects can be constructed directly via creation functions (for example, using a
Usage and rendering: CGImage itself does not render; it must be drawn into a graphics context with
Memory management: CGImage is a Core Foundation type and uses reference counting. In C you release it