ElectronNativeImage.getBitmap method
ElectronNativeImage › getBitmap
Unofficial
Returns a buffer that contains the image's raw bitmap pixel data. The difference betweengetBitmap() and toBitmap() is that getBitmap() does not copy the bitmap data, so the returned buffer must be used immediately in the current event loop tick; otherwise the data might be changed or destroyed. Signature:
getBitmap(options?: ElectronNativeImageScaleFactorOptions | undefined): BufferParameters:
| Parameter | Type | Description |
|---|---|---|
| options? | ElectronNativeImageScaleFactorOptions | undefined | Options for the bitmap conversion including scaleFactor. |
Returns: Buffer — The image's raw bitmap pixel data.