mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Selected output format > unknown file extension #344
This commit is contained in:
@@ -396,7 +396,9 @@ sharp('input.png')
|
||||
|
||||
#### toFile(path, [callback])
|
||||
|
||||
`path` is a String containing the path to write the image data to. The format is inferred from the extension, with JPEG, PNG, WebP, TIFF and DZI supported.
|
||||
`path` is a String containing the path to write the image data to.
|
||||
|
||||
If an explicit output format is not selected, it will be inferred from the extension, with JPEG, PNG, WebP, TIFF and DZI supported.
|
||||
|
||||
`callback`, if present, is called with two arguments `(err, info)` where:
|
||||
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
[#340](https://github.com/lovell/sharp/issues/340)
|
||||
[@janaz](https://github.com/janaz)
|
||||
|
||||
* Ensure selected format takes precedence over any unknown output filename extension.
|
||||
[#344](https://github.com/lovell/sharp/issues/344)
|
||||
[@ubaltaci](https://github.com/ubaltaci)
|
||||
|
||||
* Add support for libvips' PBM, PGM, PPM and FITS image format loaders.
|
||||
[#347](https://github.com/lovell/sharp/issues/347)
|
||||
[@oaleynik](https://github.com/oaleynik)
|
||||
|
||||
Reference in New Issue
Block a user