Fix location of code snippet in nativeImage docs
The code snippet for `nativeImage.createFromPath` somehow ended up in the wrong section of the document, this PR moves it back where it belongs.
This commit is contained in:
parent
b2bea57eff
commit
8e2ae9b9e7
1 changed files with 6 additions and 6 deletions
|
@ -103,6 +103,12 @@ Creates an empty `nativeImage` instance.
|
||||||
|
|
||||||
Creates a new `nativeImage` instance from a file located at `path`.
|
Creates a new `nativeImage` instance from a file located at `path`.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const nativeImage = require('electron').nativeImage;
|
||||||
|
|
||||||
|
let image = nativeImage.createFromPath('/Users/somebody/images/icon.png');
|
||||||
|
```
|
||||||
|
|
||||||
### `nativeImage.createFromBuffer(buffer[, scaleFactor])`
|
### `nativeImage.createFromBuffer(buffer[, scaleFactor])`
|
||||||
|
|
||||||
* `buffer` [Buffer][buffer]
|
* `buffer` [Buffer][buffer]
|
||||||
|
@ -121,12 +127,6 @@ Creates a new `nativeImage` instance from `dataURL`.
|
||||||
|
|
||||||
The following methods are available on instances of `nativeImage`:
|
The following methods are available on instances of `nativeImage`:
|
||||||
|
|
||||||
```javascript
|
|
||||||
const nativeImage = require('electron').nativeImage;
|
|
||||||
|
|
||||||
let image = nativeImage.createFromPath('/Users/somebody/images/icon.png');
|
|
||||||
```
|
|
||||||
|
|
||||||
### `image.toPng()`
|
### `image.toPng()`
|
||||||
|
|
||||||
Returns a [Buffer][buffer] that contains the image's `PNG` encoded data.
|
Returns a [Buffer][buffer] that contains the image's `PNG` encoded data.
|
||||||
|
|
Loading…
Reference in a new issue