Skip to content

ElectronNativeImageModule.createFromBitmap method

ElectronNativeImageModule › createFromBitmap

Unofficial

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

Signature:

createFromBitmap(buffer: Buffer, options: ElectronCreateFromBitmapOptions): ElectronNativeImage

Parameters:

Parameter Type Description
buffer Buffer The raw bitmap pixel data.
options ElectronCreateFromBitmapOptions Options describing the bitmap dimensions and scale factor.

Returns: ElectronNativeImageThe created image.