Einhugur macOS Bridge plugin. |

# EinhugurMacOSBridge.NSImage Class (desktop - console - web)

Representation of macOS NSImage object.
The object has been wrapped to make it easy to use NSImage with Xojo API’s and Einhugur API’s.
The object can be used by it self, or with NSImage coming from Declare in Xojo, or with NSImage coming from 3rd party plugin (if they can provide Integer based handle to the NSImage).
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 NSImage, with other plugin or declares that might call for release.

EinhugurCoreBridge.NSObject
NSImage

class EinhugurMacOSBridge.NSImage

#### Constructors

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

#### Properties

ClassName (Inherited) (desktop - console) | Returns the name of the Cocoa class under the hood as String.
Handle (Inherited) | Returns Integer handle to the native NSObject structure.
Height | Returns height of the NSImage.
Width | Returns width of the NSImage.

#### Methods

shared Cast | Does deep cast on incoming NSObject to NSImage.
Draw | Draws the NSImage into Xojo Graphics object at given x,y location.
Draw | Draws the NSImage into Xojo Graphics object at given x,y location, taking in additionally width and height parameters.
shared FromCGImage | Creates NSImage from a given CGImage.
shared FromFile | Loads image from contents of a file.
shared FromFileIcon | Loads image from a file or folder icon.
shared FromFileType | Loads icon for given file type.
shared FromIntegerPtr | Constructs NSImage object from Integer handle coming from declares or 3rd party plugin.
shared FromNamedImage | Returns the image object associated with the specified name.
shared FromURL | Loads image from a URL.
GetCGImageOfSize | Gets representation of given Size and returns it as EinhugurCoreBridge.CGImage.
Release (Inherited) | Releases the NSObject.
Retain (Inherited) | Retains the NSObject
ToPicture | Converts the NSImage to Xojo picture object.

#### Constants

Version = 5.0 (Inherited) |

#### Supported Platforms:

- macOS Intel 64 bit
- macOS Apple Silicon

#### 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