MonobjcMonobjc Documented Class Library
NSImage Constructor (filename)
NamespacesMonobjc.AppKitNSImageNSImage(NSString)

Initializes and returns an NSImage instance with the contents of the specified file.

Original signature is '- (id)initWithContentsOfFile:(NSString *)filename'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSImage(
	NSString filename
)
Public Sub New ( _
	filename As NSString _
)
public:
NSImage(
	NSString^ filename
)
Parameters
filename (NSString)
A full or relative path name specifying the file with the desired image data. Relative paths must be relative to the current working directory.
Return Value
An initialized NSImage instance, or nil if the method cannot create an image representation from the contents of the specified file.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

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