mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Improve SVG support by allowing control of density/DPI
Switch pre-built libs from Imagemagick to Graphicsmagick
This commit is contained in:
22
docs/api.md
22
docs/api.md
@@ -6,23 +6,27 @@ var sharp = require('sharp');
|
||||
|
||||
### Input
|
||||
|
||||
#### sharp([input])
|
||||
#### sharp([input], [options])
|
||||
|
||||
Constructor to which further methods are chained. `input`, if present, can be one of:
|
||||
Constructor to which further methods are chained.
|
||||
|
||||
* Buffer containing JPEG, PNG, WebP, GIF* or TIFF image data, or
|
||||
`input`, if present, can be one of:
|
||||
|
||||
* Buffer containing JPEG, PNG, WebP, GIF, SVG or TIFF image data, or
|
||||
* String containing the path to an image file, with most major formats supported.
|
||||
|
||||
The object returned implements the
|
||||
JPEG, PNG, WebP, GIF, SVG or TIFF format image data
|
||||
can be streamed into the object when `input` is `null` or `undefined`.
|
||||
|
||||
`options`, if present, is an Object with the following optional attributes:
|
||||
|
||||
* `density` an integral number representing the DPI for vector images, defaulting to 72.
|
||||
|
||||
The object returned by the constructor implements the
|
||||
[stream.Duplex](http://nodejs.org/api/stream.html#stream_class_stream_duplex) class.
|
||||
|
||||
JPEG, PNG, WebP, GIF* or TIFF format image data
|
||||
can be streamed into the object when `input` is not provided.
|
||||
|
||||
JPEG, PNG or WebP format image data can be streamed out from this object.
|
||||
|
||||
\* libvips 8.0.0+ is required for Buffer/Stream input of GIF and other `magick` formats.
|
||||
|
||||
```javascript
|
||||
sharp('input.jpg')
|
||||
.resize(300, 200)
|
||||
|
||||
@@ -2,11 +2,19 @@
|
||||
|
||||
### v0.13 - "*mind*"
|
||||
|
||||
#### v0.13.0 - TBD
|
||||
|
||||
* Improve vector image support by allowing control of density/DPI.
|
||||
Switch pre-built libs from Imagemagick to Graphicsmagick.
|
||||
[#110](https://github.com/lovell/sharp/issues/110)
|
||||
[@bradisbell](https://github.com/bradisbell)
|
||||
|
||||
* Switch from libvips' C to C++ bindings, requires upgrade to v8.2.2.
|
||||
[#299](https://github.com/lovell/sharp/issues/299)
|
||||
|
||||
* Control number of open files in libvips' cache; breaks existing `cache` behaviour.
|
||||
[#315](https://github.com/lovell/sharp/issues/315)
|
||||
[@impomezia](https://github.com/impomezia)
|
||||
|
||||
* Ensure 16-bit input images can be embedded onto a transparent background.
|
||||
[#340](https://github.com/lovell/sharp/issues/340)
|
||||
|
||||
@@ -15,7 +15,7 @@ npm install sharp
|
||||
[](https://circleci.com/gh/lovell/sharp)
|
||||
|
||||
libvips and its dependencies are fetched and stored within `node_modules/sharp` during `npm install`.
|
||||
This involves an automated HTTPS download of approximately 7MB.
|
||||
This involves an automated HTTPS download of approximately 6MB.
|
||||
|
||||
Most recent Linux-based operating systems running on x64 and ARMv6+ CPUs should "just work", e.g.:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user