Add size to metadata response (Stream/Buffer only) #695

This commit is contained in:
Lovell Fuller
2018-10-02 18:05:08 +01:00
parent 17f942c802
commit db4df6f0b2
5 changed files with 21 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ Fast access to (uncached) image metadata without decoding any compressed image d
A Promises/A+ promise is returned when `callback` is not provided.
- `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
- `size`: Total size of image in bytes, for Stream and Buffer input only
- `width`: Number of pixels wide (EXIF orientation is not taken into consideration)
- `height`: Number of pixels high (EXIF orientation is not taken into consideration)
- `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...][1]

View File

@@ -19,6 +19,9 @@ Requires libvips v8.7.0.
Per-operation `background` options added to `resize`, `extend` and `flatten` operations.
[#1392](https://github.com/lovell/sharp/issues/1392)
* Add `size` to `metadata` response (Stream and Buffer input only).
[#695](https://github.com/lovell/sharp/issues/695)
* Switch from custom trim operation to `vips_find_trim`.
[#914](https://github.com/lovell/sharp/issues/914)