Add createFromBuffer to planned breaking changes

This commit is contained in:
Kevin Sawicki 2016-12-14 10:12:37 -08:00
parent 9d2c9df992
commit 3b259b4243
2 changed files with 8 additions and 2 deletions

View file

@ -137,10 +137,9 @@ let image = nativeImage.createFromPath('/Users/somebody/images/icon.png')
console.log(image)
```
### `nativeImage.createFromBuffer(buffer[, scaleFactor, options])`
### `nativeImage.createFromBuffer(buffer[, options])`
* `buffer` [Buffer][buffer]
* `scaleFactor` Double (optional)
* `options` Object (optional)
* `width` Integer (optional)
* `height` Integer (optional)

View file

@ -69,6 +69,13 @@ nativeImage.toPNG()
nativeImage.toJpeg()
// Replace with
nativeImage.toJPEG()
// Deprecated
nativeImage.createFromBuffer(buffer, 1.0)
// Replace with
nativeImage.createFromBuffer(buffer, {
scaleFactor: 1.0
})
```
## `process`