mirror of
https://github.com/electron/electron.git
synced 2026-01-11 00:18:02 -05:00
Add documentation
This commit is contained in:
@@ -133,6 +133,13 @@ Returns a [Buffer][buffer] that contains the image's `JPEG` encoded data.
|
||||
|
||||
Returns the data URL of the image.
|
||||
|
||||
### `image.asNativeRepresentation(type)`
|
||||
|
||||
Returns a pointer to an underlying native type (encoded as a [Buffer][buffer]) which can be used with native APIs. Note that in many cases, this pointer is a weak pointer to the underlying native image not a copy, so you _must_ ensure that the associated `nativeImage` instance is kept around.
|
||||
|
||||
* `type` String (**required**) - one of:
|
||||
* `nsimage` - (OS X only) a pointer to an `NSImage`
|
||||
|
||||
### `image.isEmpty()`
|
||||
|
||||
Returns a boolean whether the image is empty.
|
||||
|
||||
Reference in New Issue
Block a user