Skip to content

ElectronNativeImageModule.createFromNamedImage method

ElectronNativeImageModule › createFromNamedImage

Unofficial

Creates a new NativeImage instance from the NSImage that maps to the given image name. Only available on macOS.

Signature:

createFromNamedImage(imageName: string, hslShift?: number[] | undefined): ElectronNativeImage

Parameters:

Parameter Type Description
imageName string The name of the system image.
hslShift? number[] | undefined An HSL shift applied to the image, as [hue, saturation, lightness].

Returns: ElectronNativeImageThe created image.