Autoconvert GIF+SVG input to PNG output if no format specified

This commit is contained in:
Lovell Fuller
2016-11-30 22:46:04 +00:00
parent 93e14484da
commit 7231d92d1f
5 changed files with 22 additions and 11 deletions

View File

@@ -24,7 +24,9 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
# toBuffer
Write output to a Buffer.
By default, the format will match the input image. JPEG, PNG, WebP, and RAW are supported.
JPEG, PNG, WebP, and RAW output are supported.
By default, the format will match the input image, except GIF and SVG input which become PNG output.
`callback`, if present, gets three arguments `(err, buffer, info)` where:
- `err` is an error message, if any.

View File

@@ -15,6 +15,8 @@ Requires libvips v8.4.2.
Access to these is now via output format functions, for example `quality(n)`
is now `jpeg({quality: n})` and/or `webp({quality: n})`.
* Autoconvert GIF and SVG input to PNG output if no other format is specified.
* Expose libvips' "centre" resize option to mimic \*magick's +0.5px convention.
[#568](https://github.com/lovell/sharp/issues/568)