MonobjcMonobjc Documented Class Library
NSImage Constructor (cgImage, size)
NamespacesMonobjc.AppKitNSImageNSImage(IntPtr, NSSize)

Initializes and returns an NSImage instance with the contents of the CGImage.

Original signature is '- (id)initWithCGImage:(CGImageRef)cgImage size:(NSSize)size'

Available in Mac OS X v10.6 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSImage(
	IntPtr cgImage,
	NSSize size
)
Public Sub New ( _
	cgImage As IntPtr, _
	size As NSSize _
)
public:
NSImage(
	IntPtr cgImage, 
	NSSize size
)
Parameters
cgImage (IntPtr)
The source CGImage.
size (NSSize)
The size of the new image. If size is NSZeroSize, the pixel dimensions of cgImage are assumed as the image’s size.
Return Value
An initialized NSImage instance, or nil if the new instance cannot be initialized.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)