mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Default TIFF predictor to horizontal to match libvips' behaviour
This commit is contained in:
parent
3c88c84998
commit
965a97105e
@ -87,6 +87,8 @@ Returns **Sharp**
|
||||
An advanced setting that switches the libvips access method to `VIPS_ACCESS_SEQUENTIAL`.
|
||||
This will reduce memory usage and can improve performance on some systems.
|
||||
|
||||
The default behaviour _before_ function call is `false`, meaning the libvips access method is not sequential.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `sequentialRead` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `true`)
|
||||
|
@ -140,7 +140,7 @@ Use these TIFF options for output image.
|
||||
- `options.quality` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** quality, integer 1-100 (optional, default `80`)
|
||||
- `options.force` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** force TIFF output, otherwise attempt to use input format (optional, default `true`)
|
||||
- `options.compression` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** compression options: lzw, deflate, jpeg (optional, default `'jpeg'`)
|
||||
- `options.predictor` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** compression predictor options: none, horizontal, float (optional, default `'none'`)
|
||||
- `options.predictor` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** compression predictor options: none, horizontal, float (optional, default `'horizontal'`)
|
||||
- `options.xres` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** horizontal resolution in pixels/mm (optional, default `1.0`)
|
||||
- `options.yres` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** vertical resolution in pixels/mm (optional, default `1.0`)
|
||||
- `options.squash` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** squash 8-bit images down to 1 bit (optional, default `false`)
|
||||
|
@ -160,6 +160,8 @@ Do not enlarge the output image if the input image width _or_ height are already
|
||||
This is equivalent to GraphicsMagick's `>` geometry option:
|
||||
"_change the dimensions of the image only if its width or height exceeds the geometry specification_".
|
||||
|
||||
The default behaviour _before_ function call is `false`, meaning the image will be enlarged.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `withoutEnlargement` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `true`)
|
||||
|
@ -22,6 +22,8 @@ Requires libvips v8.6.0.
|
||||
[#977](https://github.com/lovell/sharp/pull/977)
|
||||
[@jardakotesovec](https://github.com/jardakotesovec)
|
||||
|
||||
* TIFF output: switch default predictor from 'none' to 'horizontal' to match libvips' behaviour.
|
||||
|
||||
### v0.18 - "*ridge*"
|
||||
|
||||
Requires libvips v8.5.5.
|
||||
|
@ -198,7 +198,7 @@ const Sharp = function (input, options) {
|
||||
webpNearLossless: false,
|
||||
tiffQuality: 80,
|
||||
tiffCompression: 'jpeg',
|
||||
tiffPredictor: 'none',
|
||||
tiffPredictor: 'horizontal',
|
||||
tiffSquash: false,
|
||||
tiffXres: 1.0,
|
||||
tiffYres: 1.0,
|
||||
|
@ -214,7 +214,7 @@ function webp (options) {
|
||||
* @param {Number} [options.quality=80] - quality, integer 1-100
|
||||
* @param {Boolean} [options.force=true] - force TIFF output, otherwise attempt to use input format
|
||||
* @param {Boolean} [options.compression='jpeg'] - compression options: lzw, deflate, jpeg
|
||||
* @param {Boolean} [options.predictor='none'] - compression predictor options: none, horizontal, float
|
||||
* @param {Boolean} [options.predictor='horizontal'] - compression predictor options: none, horizontal, float
|
||||
* @param {Number} [options.xres=1.0] - horizontal resolution in pixels/mm
|
||||
* @param {Number} [options.yres=1.0] - vertical resolution in pixels/mm
|
||||
* @param {Boolean} [options.squash=false] - squash 8-bit images down to 1 bit
|
||||
|
@ -184,7 +184,7 @@ struct PipelineBaton {
|
||||
webpQuality(80),
|
||||
tiffQuality(80),
|
||||
tiffCompression(VIPS_FOREIGN_TIFF_COMPRESSION_JPEG),
|
||||
tiffPredictor(VIPS_FOREIGN_TIFF_PREDICTOR_NONE),
|
||||
tiffPredictor(VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL),
|
||||
tiffSquash(false),
|
||||
tiffXres(1.0),
|
||||
tiffYres(1.0),
|
||||
|
Loading…
x
Reference in New Issue
Block a user