moves bitmap parameters to options object
This commit is contained in:
parent
39875c90f1
commit
a609e52a14
3 changed files with 16 additions and 10 deletions
|
@ -137,17 +137,19 @@ let image = nativeImage.createFromPath('/Users/somebody/images/icon.png')
|
|||
console.log(image)
|
||||
```
|
||||
|
||||
### `nativeImage.createFromBuffer(buffer[width, height, scaleFactor])`
|
||||
### `nativeImage.createFromBuffer(buffer[, scaleFactor, options])`
|
||||
|
||||
* `buffer` [Buffer][buffer]
|
||||
* `width` Integer (optional)
|
||||
* `height` Integer (optional)
|
||||
* `scaleFactor` Double (optional)
|
||||
* `options` Object (optional)
|
||||
* `width` Integer (optional)
|
||||
* `height` Integer (optional)
|
||||
* `scaleFactor` Double (optional)
|
||||
|
||||
Returns `NativeImage`
|
||||
|
||||
Creates a new `NativeImage` instance from `buffer`. The default `scaleFactor` is
|
||||
1.0. If `buffer` is a bitmap, specify `width` and `height` of the image.
|
||||
1.0. The `width` and `height` options are **required** for bitmap buffers.
|
||||
|
||||
### `nativeImage.createFromDataURL(dataURL)`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue