mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add 'size' attribute to callback's info Object #138
This commit is contained in:
@@ -429,7 +429,7 @@ An advanced setting to disable adaptive row filtering for the lossless PNG outpu
|
||||
`callback`, if present, is called with two arguments `(err, info)` where:
|
||||
|
||||
* `err` contains an error message, if any.
|
||||
* `info` contains the output image `format`, `width` and `height`.
|
||||
* `info` contains the output image `format`, `size` (bytes), `width` and `height`.
|
||||
|
||||
A Promises/A+ promise is returned when `callback` is not provided.
|
||||
|
||||
@@ -441,7 +441,7 @@ Write image data to a Buffer, the format of which will match the input image by
|
||||
|
||||
* `err` is an error message, if any.
|
||||
* `buffer` is the output image data.
|
||||
* `info` contains the output image `format`, `width` and `height`.
|
||||
* `info` contains the output image `format`, `size` (bytes), `width` and `height`.
|
||||
|
||||
A Promises/A+ promise is returned when `callback` is not provided.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user