Skip to content

ElectronNativeImage.toPNG method

ElectronNativeImage › toPNG

Unofficial

Returns a buffer that contains the image's PNG encoded data.

Signature:

toPNG(options?: ElectronNativeImageScaleFactorOptions | undefined): Buffer

Parameters:

Parameter Type Description
options? ElectronNativeImageScaleFactorOptions | undefined Options for the PNG conversion including scaleFactor.

Returns: BufferThe PNG buffer.