Browse Source

Document nativeImage.addRepresentation(options)

Kevin Sawicki 8 years ago
parent
commit
089bfd2cd2
1 changed files with 14 additions and 0 deletions
  1. 14 0
      docs/api/native-image.md

+ 14 - 0
docs/api/native-image.md

@@ -265,4 +265,18 @@ will be preserved in the resized image.
 
 Returns `Float` - The image's aspect ratio.
 
+#### `image.addRepresentation(options)`
+
+* `options` Object
+  * `scaleFactor` Double - The scale factor to add the image representation for.
+  * `width` Integer (optional)
+  * `height` Integer (optional)
+  * `buffer` Buffer (optional) - The buffer containing the raw image data.
+  * `dataURL` String (optional) - The data URL containing either a base 64
+    encoded PNG or JPEG image.
+
+Add an image representation for a specific scale factor. This can be used
+to explicitly add different scale factor representations to an image. This
+can be called on empty images.
+
 [buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer