CGBitmapContext
CGBitmapContext is a data type in the Core Graphics framework of Apple's macOS and iOS operating systems. It is used for creating and manipulating bitmap images in memory. A bitmap context is essentially a drawing area in memory where you can draw using Quartz 2D drawing commands. This allows for the creation of images programmatically, which can then be used in various applications, such as drawing apps, image processing, or generating custom graphics.
Creating a CGBitmapContext involves specifying the size of the bitmap, the color space, the bits per pixel,
CGBitmapContext is particularly useful for tasks that require off-screen rendering, such as generating thumbnails, applying filters