Add premultiplied boolean flag for raw pixel data input (#2685)

This commit is contained in:
Michael Nutt
2021-05-03 14:30:37 -04:00
committed by GitHub
parent 309918a878
commit 9a1e8ed574
9 changed files with 60 additions and 1 deletions

View File

@@ -37,6 +37,8 @@ Implements the [stream.Duplex][1] class.
* `options.raw.width` **[number][8]?** integral number of pixels wide.
* `options.raw.height` **[number][8]?** integral number of pixels high.
* `options.raw.channels` **[number][8]?** integral number of channels, between 1 and 4.
* `options.raw.premultiplied` **[boolean][7]?** specifies that the raw input has already been premultiplied, set to `true`
to avoid sharp premultiplying the image. (optional, default `false`)
* `options.create` **[Object][6]?** describes a new image to be created.
* `options.create.width` **[number][8]?** integral number of pixels wide.