mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 13:46:19 +01:00
Encoding lossless AVIF is mutually exclusive with iq tuning
This commit is contained in:
@@ -1175,7 +1175,7 @@ function tiff (options) {
|
||||
* @param {number} [options.effort=4] - CPU effort, between 0 (fastest) and 9 (slowest)
|
||||
* @param {string} [options.chromaSubsampling='4:4:4'] - set to '4:2:0' to use chroma subsampling
|
||||
* @param {number} [options.bitdepth=8] - set bitdepth to 8, 10 or 12 bit
|
||||
* @param {string} [options.tune='iq'] - tune output for a quality metric, one of 'iq' (default), 'ssim' or 'psnr'
|
||||
* @param {string} [options.tune='iq'] - tune output for a quality metric, one of 'iq' (default), 'ssim' (default when lossless) or 'psnr'
|
||||
* @returns {Sharp}
|
||||
* @throws {Error} Invalid options
|
||||
*/
|
||||
@@ -1255,7 +1255,11 @@ function heif (options) {
|
||||
}
|
||||
if (is.defined(options.tune)) {
|
||||
if (is.string(options.tune) && is.inArray(options.tune, ['iq', 'ssim', 'psnr'])) {
|
||||
this.options.heifTune = options.tune;
|
||||
if (this.options.heifLossless && options.tune === 'iq') {
|
||||
this.options.heifTune = 'ssim';
|
||||
} else {
|
||||
this.options.heifTune = options.tune;
|
||||
}
|
||||
} else {
|
||||
throw is.invalidParameterError('tune', 'one of: psnr, ssim, iq', options.tune);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user