mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Autoconvert GIF+SVG input to PNG output if no format specified
This commit is contained in:
@@ -45,7 +45,9 @@ const toFile = function toFile (fileOut, callback) {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* - `buffer` is the output image data.
|
||||
|
||||
Reference in New Issue
Block a user