Add support for miniswhite when using TIFF output

This commit is contained in:
Dennis Beatty
2023-09-26 14:38:34 +01:00
committed by Lovell Fuller
parent 0f24f0f214
commit 28aa176957
9 changed files with 29 additions and 2 deletions

View File

@@ -782,6 +782,7 @@ function trySetAnimationOptions (source, target) {
* @param {number} [options.yres=1.0] - vertical resolution in pixels/mm
* @param {string} [options.resolutionUnit='inch'] - resolution unit options: inch, cm
* @param {number} [options.bitdepth=8] - reduce bitdepth to 1, 2 or 4 bit
* @param {boolean} [options.miniswhite=false] - write 1-bit images as miniswhite
* @returns {Sharp}
* @throws {Error} Invalid options
*/
@@ -819,6 +820,10 @@ function tiff (options) {
throw is.invalidParameterError('tileHeight', 'integer greater than zero', options.tileHeight);
}
}
// miniswhite
if (is.defined(options.miniswhite)) {
this._setBooleanOption('tiffMiniswhite', options.miniswhite);
}
// pyramid
if (is.defined(options.pyramid)) {
this._setBooleanOption('tiffPyramid', options.pyramid);