mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Expose libvips centre option, mimics *magick +0.5px convention
This commit is contained in:
@@ -68,6 +68,7 @@ Use these JPEG options for output image.
|
||||
- `trellisQuantisation` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** apply trellis quantisation, requires mozjpeg (optional, default `false`)
|
||||
- `overshootDeringing` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** apply overshoot deringing, requires mozjpeg (optional, default `false`)
|
||||
- `optimiseScans` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** optimise progressive scans, forces progressive, requires mozjpeg (optional, default `false`)
|
||||
- `optimizeScans` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** alternative spelling of optimiseScans (optional, default `false`)
|
||||
|
||||
|
||||
- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** Invalid options
|
||||
|
||||
@@ -27,6 +27,8 @@ Possible enlargement interpolators are:
|
||||
- `options` **\[[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)]**
|
||||
- `options.kernel` **\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the kernel to use for image reduction. (optional, default `'lanczos3'`)
|
||||
- `options.interpolator` **\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the interpolator to use for image enlargement. (optional, default `'bicubic'`)
|
||||
- `options.centreSampling` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** use \*magick centre sampling convention instead of corner sampling. (optional, default `false`)
|
||||
- `options.centerSampling` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** alternative spelling of centreSampling. (optional, default `false`)
|
||||
|
||||
**Examples**
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ 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})`.
|
||||
|
||||
* Expose libvips' "centre" resize option to mimic \*magick's +0.5px convention.
|
||||
[#568](https://github.com/lovell/sharp/issues/568)
|
||||
|
||||
* Ensure support for embedded base64 PNG and JPEG images within an SVG.
|
||||
[#601](https://github.com/lovell/sharp/issues/601)
|
||||
[@dynamite-ready](https://github.com/dynamite-ready)
|
||||
|
||||
Reference in New Issue
Block a user