Add experimental entropy field to stats response

This commit is contained in:
Lovell Fuller
2018-08-06 15:41:27 +01:00
parent 532de4ecab
commit 25bd2cea3e
5 changed files with 32 additions and 9 deletions

View File

@@ -264,6 +264,7 @@ function metadata (callback) {
* - `maxX` (x-coordinate of one of the pixel where the maximum lies)
* - `maxY` (y-coordinate of one of the pixel where the maximum lies)
* - `isOpaque`: Value to identify if the image is opaque or transparent, based on the presence and use of alpha channel
* - `entropy`: Histogram-based estimation of greyscale entropy, discarding alpha channel if any (experimental)
*
* @example
* const image = sharp(inputJpg);