Merge pull request #4791 from atom/nativeimage-as-nsimage
Convert NativeImage instances to OS-specific representations
This commit is contained in:
commit
081ab17e13
4 changed files with 41 additions and 0 deletions
|
@ -133,6 +133,12 @@ Returns a [Buffer][buffer] that contains the image's `JPEG` encoded data.
|
|||
|
||||
Returns the data URL of the image.
|
||||
|
||||
### `image.getNativeHandle()`
|
||||
|
||||
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.
|
||||
|
||||
Returns a [Buffer][buffer] that represents a pointer to a native type - on OS X, this type is an NSImage object.
|
||||
|
||||
### `image.isEmpty()`
|
||||
|
||||
Returns a boolean whether the image is empty.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue