mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Autoconvert GIF+SVG input to PNG output if no format specified
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user