Add createFromBuffer to planned breaking changes
This commit is contained in:
parent
9d2c9df992
commit
3b259b4243
2 changed files with 8 additions and 2 deletions
|
@ -137,10 +137,9 @@ let image = nativeImage.createFromPath('/Users/somebody/images/icon.png')
|
||||||
console.log(image)
|
console.log(image)
|
||||||
```
|
```
|
||||||
|
|
||||||
### `nativeImage.createFromBuffer(buffer[, scaleFactor, options])`
|
### `nativeImage.createFromBuffer(buffer[, options])`
|
||||||
|
|
||||||
* `buffer` [Buffer][buffer]
|
* `buffer` [Buffer][buffer]
|
||||||
* `scaleFactor` Double (optional)
|
|
||||||
* `options` Object (optional)
|
* `options` Object (optional)
|
||||||
* `width` Integer (optional)
|
* `width` Integer (optional)
|
||||||
* `height` Integer (optional)
|
* `height` Integer (optional)
|
||||||
|
|
|
@ -69,6 +69,13 @@ nativeImage.toPNG()
|
||||||
nativeImage.toJpeg()
|
nativeImage.toJpeg()
|
||||||
// Replace with
|
// Replace with
|
||||||
nativeImage.toJPEG()
|
nativeImage.toJPEG()
|
||||||
|
|
||||||
|
// Deprecated
|
||||||
|
nativeImage.createFromBuffer(buffer, 1.0)
|
||||||
|
// Replace with
|
||||||
|
nativeImage.createFromBuffer(buffer, {
|
||||||
|
scaleFactor: 1.0
|
||||||
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
## `process`
|
## `process`
|
||||||
|
|
Loading…
Reference in a new issue