Document scale factor option
This commit is contained in:
parent
82a81bb26e
commit
6d5fbe6be2
1 changed files with 16 additions and 4 deletions
|
@ -165,7 +165,10 @@ Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer
|
|||
|
||||
The following methods are available on instances of the `NativeImage` class:
|
||||
|
||||
#### `image.toPNG()`
|
||||
#### `image.toPNG([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||
|
||||
Returns `Buffer` - A [Buffer][buffer] that contains the image's `PNG` encoded data.
|
||||
|
||||
|
@ -175,16 +178,25 @@ Returns `Buffer` - A [Buffer][buffer] that contains the image's `PNG` encoded da
|
|||
|
||||
Returns `Buffer` - A [Buffer][buffer] that contains the image's `JPEG` encoded data.
|
||||
|
||||
#### `image.toBitmap()`
|
||||
#### `image.toBitmap([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||
|
||||
Returns `Buffer` - A [Buffer][buffer] that contains a copy of the image's raw bitmap pixel
|
||||
data.
|
||||
|
||||
#### `image.toDataURL()`
|
||||
#### `image.toDataURL([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||
|
||||
Returns `String` - The data URL of the image.
|
||||
|
||||
#### `image.getBitmap()`
|
||||
#### `image.getBitmap([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||
|
||||
Returns `Buffer` - A [Buffer][buffer] that contains the image's raw bitmap pixel data.
|
||||
|
||||
|
|
Loading…
Reference in a new issue