function tiff (options) {
  if (is.object(options)) {
    if (is.defined(options.quality)) {
      if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) {
        this.options.tiffQuality = options.quality;
      } else {
        throw new Error('Invalid quality (integer, 1-100) ' + options.quality);
      }
    }
    if (is.defined(options.squash)) {
      if (is.bool(options.squash)) {
        this.options.tiffSquash = options.squash;
      } else {
        throw new Error('Invalid Value for squash ' + options.squash + ' Only Boolean Values allowed for options.squash.');
      }
    }
    // tiling
    if (is.defined(options.tile)) {
      if (is.bool(options.tile)) {
        this.options.tiffTile = options.tile;
      } else {
        throw new Error('Invalid Value for tile ' + options.tile + ' Only Boolean values allowed for options.tile');
      }
    }
    if (is.defined(options.tileWidth)) {
      if (is.number(options.tileWidth) && options.tileWidth > 0) {
        this.options.tiffTileWidth = options.tileWidth;
      } else {
        throw new Error('Invalid Value for tileWidth ' + options.tileWidth + ' Only positive numeric values allowed for options.tileWidth');
      }
    }
    if (is.defined(options.tileHeight)) {
      if (is.number(options.tileHeight) && options.tileHeight > 0) {
        this.options.tiffTileHeight = options.tileHeight;
      } else {
        throw new Error('Invalid Value for tileHeight ' + options.tileHeight + ' Only positive numeric values allowed for options.tileHeight');
      }
    }
    // pyramid
    if (is.defined(options.pyramid)) {
      if (is.bool(options.pyramid)) {
        this.options.tiffPyramid = options.pyramid;
      } else {
        throw new Error('Invalid Value for pyramid ' + options.pyramid + ' Only Boolean values allowed for options.pyramid');
      }
    }
    // resolution
    if (is.defined(options.xres)) {
      if (is.number(options.xres)) {
        this.options.tiffXres = options.xres;
      } else {
        throw new Error('Invalid Value for xres ' + options.xres + ' Only numeric values allowed for options.xres');
      }
    }
    if (is.defined(options.yres)) {
      if (is.number(options.yres)) {
        this.options.tiffYres = options.yres;
      } else {
        throw new Error('Invalid Value for yres ' + options.yres + ' Only numeric values allowed for options.yres');
      }
    }
    // compression
    if (is.defined(options.compression)) {
      if (is.string(options.compression) && is.inArray(options.compression, ['lzw', 'deflate', 'jpeg', 'ccittfax4', 'none'])) {
        this.options.tiffCompression = options.compression;
      } else {
        const message = `Invalid compression option "${options.compression}". Should be one of: lzw, deflate, jpeg, ccittfax4, none`;
        throw new Error(message);
      }
    }
    // predictor
    if (is.defined(options.predictor)) {
      if (is.string(options.predictor) && is.inArray(options.predictor, ['none', 'horizontal', 'float'])) {
        this.options.tiffPredictor = options.predictor;
      } else {
        const message = `Invalid predictor option "${options.predictor}". Should be one of: none, horizontal, float`;
        throw new Error(message);
      }
    }
  }
  return this._updateFormatOut('tiff', options);
}
function tiff (options) {
  if (is.object(options)) {
    if (is.defined(options.quality)) {
      if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) {
        this.options.tiffQuality = options.quality;
      } else {
        throw new Error('Invalid quality (integer, 1-100) ' + options.quality);
      }
    }
    if (is.defined(options.squash)) {
      if (is.bool(options.squash)) {
        this.options.tiffSquash = options.squash;
      } else {
        throw new Error('Invalid Value for squash ' + options.squash + ' Only Boolean Values allowed for options.squash.');
      }
    }
    // tiling
    if (is.defined(options.tile)) {
      if (is.bool(options.tile)) {
        this.options.tiffTile = options.tile;
      } else {
        throw new Error('Invalid Value for tile ' + options.tile + ' Only Boolean values allowed for options.tile');
      }
    }
    if (is.defined(options.tileWidth)) {
      if (is.number(options.tileWidth) && options.tileWidth > 0) {
        this.options.tiffTileWidth = options.tileWidth;
      } else {
        throw new Error('Invalid Value for tileWidth ' + options.tileWidth + ' Only positive numeric values allowed for options.tileWidth');
      }
    }
    if (is.defined(options.tileHeight)) {
      if (is.number(options.tileHeight) && options.tileHeight > 0) {
        this.options.tiffTileHeight = options.tileHeight;
      } else {
        throw new Error('Invalid Value for tileHeight ' + options.tileHeight + ' Only positive numeric values allowed for options.tileHeight');
      }
    }
    // pyramid
    if (is.defined(options.pyramid)) {
      if (is.bool(options.pyramid)) {
        this.options.tiffPyramid = options.pyramid;
      } else {
        throw new Error('Invalid Value for pyramid ' + options.pyramid + ' Only Boolean values allowed for options.pyramid');
      }
    }
    // resolution
    if (is.defined(options.xres)) {
      if (is.number(options.xres)) {
        this.options.tiffXres = options.xres;
      } else {
        throw new Error('Invalid Value for xres ' + options.xres + ' Only numeric values allowed for options.xres');
      }
    }
    if (is.defined(options.yres)) {
      if (is.number(options.yres)) {
        this.options.tiffYres = options.yres;
      } else {
        throw new Error('Invalid Value for yres ' + options.yres + ' Only numeric values allowed for options.yres');
      }
    }
    // compression
    if (is.defined(options.compression)) {
      if (is.string(options.compression) && is.inArray(options.compression, ['lzw', 'deflate', 'jpeg', 'ccittfax4', 'none'])) {
        this.options.tiffCompression = options.compression;
      } else {
        const message = `Invalid compression option "${options.compression}". Should be one of: lzw, deflate, jpeg, ccittfax4, none`;
        throw new Error(message);
      }
    }
    // predictor
    if (is.defined(options.predictor)) {
      if (is.string(options.predictor) && is.inArray(options.predictor, ['none', 'horizontal', 'float'])) {
        this.options.tiffPredictor = options.predictor;
      } else {
        const message = `Invalid predictor option "${options.predictor}". Should be one of: none, horizontal, float`;
        throw new Error(message);
      }
    }
  }
  return this._updateFormatOut('tiff', options);
}
function tiff ( options ) { if ( is . object ( options ) ) { if ( is . defined ( options . quality ) ) { if ( is . integer ( options . quality ) && is . inRange ( options . quality , 1 , 100 ) ) { this . options . tiffQuality = options . quality ; } else { throw new Error ( 'Invalid quality (integer, 1-100) ' + options . quality ) ; } } if ( is . defined ( options . squash ) ) { if ( is . bool ( options . squash ) ) { this . options . tiffSquash = options . squash ; } else { throw new Error ( 'Invalid Value for squash ' + options . squash + ' Only Boolean Values allowed for options.squash.' ) ; } } // tiling if ( is . defined ( options . tile ) ) { if ( is . bool ( options . tile ) ) { this . options . tiffTile = options . tile ; } else { throw new Error ( 'Invalid Value for tile ' + options . tile + ' Only Boolean values allowed for options.tile' ) ; } } if ( is . defined ( options . tileWidth ) ) { if ( is . number ( options . tileWidth ) && options . tileWidth > 0 ) { this . options . tiffTileWidth = options . tileWidth ; } else { throw new Error ( 'Invalid Value for tileWidth ' + options . tileWidth + ' Only positive numeric values allowed for options.tileWidth' ) ; } } if ( is . defined ( options . tileHeight ) ) { if ( is . number ( options . tileHeight ) && options . tileHeight > 0 ) { this . options . tiffTileHeight = options . tileHeight ; } else { throw new Error ( 'Invalid Value for tileHeight ' + options . tileHeight + ' Only positive numeric values allowed for options.tileHeight' ) ; } } // pyramid if ( is . defined ( options . pyramid ) ) { if ( is . bool ( options . pyramid ) ) { this . options . tiffPyramid = options . pyramid ; } else { throw new Error ( 'Invalid Value for pyramid ' + options . pyramid + ' Only Boolean values allowed for options.pyramid' ) ; } } // resolution if ( is . defined ( options . xres ) ) { if ( is . number ( options . xres ) ) { this . options . tiffXres = options . xres ; } else { throw new Error ( 'Invalid Value for xres ' + options . xres + ' Only numeric values allowed for options.xres' ) ; } } if ( is . defined ( options . yres ) ) { if ( is . number ( options . yres ) ) { this . options . tiffYres = options . yres ; } else { throw new Error ( 'Invalid Value for yres ' + options . yres + ' Only numeric values allowed for options.yres' ) ; } } // compression if ( is . defined ( options . compression ) ) { if ( is . string ( options . compression ) && is . inArray ( options . compression , [ 'lzw' , 'deflate' , 'jpeg' , 'ccittfax4' , 'none' ] ) ) { this . options . tiffCompression = options . compression ; } else { const message = ` ${ options . compression } ` ; throw new Error ( message ) ; } } // predictor if ( is . defined ( options . predictor ) ) { if ( is . string ( options . predictor ) && is . inArray ( options . predictor , [ 'none' , 'horizontal' , 'float' ] ) ) { this . options . tiffPredictor = options . predictor ; } else { const message = ` ${ options . predictor } ` ; throw new Error ( message ) ; } } } return this . _updateFormatOut ( 'tiff' , options ) ; }
Use these TIFF options for output image.

@example
// Convert SVG input to LZW-compressed, 1 bit per pixel TIFF output
sharp('input.svg')
.tiff({
compression: 'lzw',
squash: true
})
.toFile('1-bpp-output.tiff')
.then(info => { ... });

@param {Object} [options] - output 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, ccittfax4
@param {Boolean} [options.predictor='horizontal'] - compression predictor options: none, horizontal, float
@param {Boolean} [options.pyramid=false] - write an image pyramid
@param {Boolean} [options.tile=false] - write a tiled tiff
@param {Boolean} [options.tileWidth=256] - horizontal tile size
@param {Boolean} [options.tileHeight=256] - vertical tile size
@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
@returns {Sharp}
@throws {Error} Invalid options
Use these TIFF options for output image .
TIFF Options