mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add support for miniswhite when using TIFF output
This commit is contained in:
committed by
Lovell Fuller
parent
0f24f0f214
commit
28aa176957
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user