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:

ParameterTypeDescription
options?ElectronNativeImageScaleFactorOptions | undefinedOptions for the PNG conversion including scaleFactor.

Returns: BufferThe PNG buffer.