mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Docs: fastShrinkOnLoad can round-down when auto-scaling
This commit is contained in:
parent
069803b83d
commit
9f79f80a93
@ -53,7 +53,7 @@ Previous calls to `resize` in the same pipeline will be ignored.
|
|||||||
| [options.kernel] | <code>String</code> | <code>'lanczos3'</code> | the kernel to use for image reduction. Use the `fastShrinkOnLoad` option to control kernel vs shrink-on-load. |
|
| [options.kernel] | <code>String</code> | <code>'lanczos3'</code> | the kernel to use for image reduction. Use the `fastShrinkOnLoad` option to control kernel vs shrink-on-load. |
|
||||||
| [options.withoutEnlargement] | <code>Boolean</code> | <code>false</code> | do not enlarge if the width *or* height are already less than the specified dimensions, equivalent to GraphicsMagick's `>` geometry option. |
|
| [options.withoutEnlargement] | <code>Boolean</code> | <code>false</code> | do not enlarge if the width *or* height are already less than the specified dimensions, equivalent to GraphicsMagick's `>` geometry option. |
|
||||||
| [options.withoutReduction] | <code>Boolean</code> | <code>false</code> | do not reduce if the width *or* height are already greater than the specified dimensions, equivalent to GraphicsMagick's `<` geometry option. |
|
| [options.withoutReduction] | <code>Boolean</code> | <code>false</code> | do not reduce if the width *or* height are already greater than the specified dimensions, equivalent to GraphicsMagick's `<` geometry option. |
|
||||||
| [options.fastShrinkOnLoad] | <code>Boolean</code> | <code>true</code> | take greater advantage of the JPEG and WebP shrink-on-load feature, which can lead to a slight moiré pattern on some images. |
|
| [options.fastShrinkOnLoad] | <code>Boolean</code> | <code>true</code> | take greater advantage of the JPEG and WebP shrink-on-load feature, which can lead to a slight moiré pattern or round-down of an auto-scaled dimension. |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
|
@ -227,7 +227,7 @@ function isResizeExpected (options) {
|
|||||||
* @param {String} [options.kernel='lanczos3'] - the kernel to use for image reduction. Use the `fastShrinkOnLoad` option to control kernel vs shrink-on-load.
|
* @param {String} [options.kernel='lanczos3'] - the kernel to use for image reduction. Use the `fastShrinkOnLoad` option to control kernel vs shrink-on-load.
|
||||||
* @param {Boolean} [options.withoutEnlargement=false] - do not enlarge if the width *or* height are already less than the specified dimensions, equivalent to GraphicsMagick's `>` geometry option.
|
* @param {Boolean} [options.withoutEnlargement=false] - do not enlarge if the width *or* height are already less than the specified dimensions, equivalent to GraphicsMagick's `>` geometry option.
|
||||||
* @param {Boolean} [options.withoutReduction=false] - do not reduce if the width *or* height are already greater than the specified dimensions, equivalent to GraphicsMagick's `<` geometry option.
|
* @param {Boolean} [options.withoutReduction=false] - do not reduce if the width *or* height are already greater than the specified dimensions, equivalent to GraphicsMagick's `<` geometry option.
|
||||||
* @param {Boolean} [options.fastShrinkOnLoad=true] - take greater advantage of the JPEG and WebP shrink-on-load feature, which can lead to a slight moiré pattern on some images.
|
* @param {Boolean} [options.fastShrinkOnLoad=true] - take greater advantage of the JPEG and WebP shrink-on-load feature, which can lead to a slight moiré pattern or round-down of an auto-scaled dimension.
|
||||||
* @returns {Sharp}
|
* @returns {Sharp}
|
||||||
* @throws {Error} Invalid parameters
|
* @throws {Error} Invalid parameters
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user