From 089bfd2cd2e24e5bb85e0a89c0bdf67b78c5f242 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 7 Mar 2017 14:29:37 -0800 Subject: [PATCH] Document nativeImage.addRepresentation(options) --- docs/api/native-image.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/api/native-image.md b/docs/api/native-image.md index 0350f13bc902..69658d6f87b5 100644 --- a/docs/api/native-image.md +++ b/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