Skip to content

ElectronNativeImage.toPNG method

ElectronNativeImage › toPNG

Unofficial

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

Signature:

toPNG(options?: ElectronNativeImageScaleFactorOptions): Buffer

Parameters:

ParameterTypeDescription
options?ElectronNativeImageScaleFactorOptionsOptions for the PNG conversion including scaleFactor.

Returns: Buffer — The PNG buffer.