mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Update code example
This commit is contained in:
@@ -115,7 +115,9 @@ Creates a new `NativeImage` instance from `dataUrl`.
|
||||
The following methods are available on instances of `nativeImage`
|
||||
|
||||
```javascript
|
||||
var image = nativeImage.createFromPath('/Users/somebody/images/icon.png')
|
||||
var NativeImage = require('native-image');
|
||||
|
||||
var image = NativeImage.createFromPath('/Users/somebody/images/icon.png');
|
||||
```
|
||||
|
||||
### `image.toPng()`
|
||||
|
||||
Reference in New Issue
Block a user