Companion

Functions

Link copied to clipboard

Creates an empty NativeImage instance.

Link copied to clipboard

Creates a new NativeImage instance from buffer that contains the raw bitmap pixel data returned by toBitmap(). The specific format is platform-dependent.

Link copied to clipboard
fun createFromBuffer(buffer: Buffer<*>, options: CreateFromBufferOptions = definedExternally): NativeImage

Creates a new NativeImage instance from buffer. Tries to decode as PNG or JPEG first.

Link copied to clipboard

Creates a new NativeImage instance from dataUrl, a base 64 encoded Data URL string.

Link copied to clipboard
fun createFromNamedImage(imageName: String, hslShift: ReadonlyArray<Double> = definedExternally): NativeImage

Creates a new NativeImage instance from the NSImage that maps to the given image name. See Apple's NSImageName documentation for a list of possible values.

Link copied to clipboard

Creates a new NativeImage instance from an image file (e.g., PNG or JPEG) located at path. This method returns an empty image if the path does not exist, cannot be read, or is not a valid image.

Link copied to clipboard

fulfilled with the file's thumbnail preview image, which is a NativeImage.