Einhugur macOS Bridge plugin. |

# EinhugurCoreBridge.CGImage Class

Representation of macOS CGImage object.
The object has been wrapped to make it easy to us NSImage with Xojo API’s and Einhugur API’s.
The object can be used by it self, or with CGImage coming from Declare in Xojo, or with CGImage coming from 3rd party plugin (if they can provide Integer based handle to the CGImage).
The object will be automatically released like any other Xojo object. Do not manually use the Release method unless you have done something externally to the CGImage, with other plugin or declares that might call for release.

Object
CGImage

class EinhugurCoreBridge.CGImage

#### Constructors

CGImage (private) | Private constructor. This class can only be constructed with the Shared methods on the class.

#### Properties

ColorSpace | Returns info on what kind of colorspace the RawBitmap has. (RGB, Gray, CMYK or UNKNOWN). This can be any value from the RawBitmap.ColorSpaces enum.
Depth | Returns the depth per channel of the bitmap.
Handle | Returns Integer handle to the native CGImageRef structure.
HasAlphaChannel | Returns true if the CGImage has alpha channel, else false.
Height | Returns the height of the Bitmap in pixels.
PixelBytes | Returns number of bytes per pixel in the image.
RowBytes | Returns the number of bytes in each row of the bitmap.
Width | Returns the width of the Bitmap in pixels.

#### Methods

Draw | Draws the CGImage into Xojo Graphics.
shared FromIntegerPtr | Constructs CGImage object from Integer handle coming from declares or 3rd party plugin.
shared FromRawBitmap | Creates CGImage from Einhugur RawBitmap object.
GetImageInRect | Creates a CGImage bitmap image using the data contained within a subregion of an existing CGImage bitmap image.
Release | Releases the CGImage.
Retain | Retains the CGImage
ToPicture | Creates Xojo picture object from the CGImage.
ToRawBitmap | Creates Einhugur RawBitmap from the CGImage

#### Supported Platforms:

- macOS Intel 64 bit
- macOS Apple Silicon
- iOS

#### Unsupported Platforms:

- Windows 32 bit
- Windows 64 bit
- Windows ARM 64 bit
- Linux 32 bit
- Linux 64 bit
- Linux ARM 32 bit
- Linux ARM 64 bit