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

@@ -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.