Add support for Group4 (CCITTFAX4) compression to TIFF output (#1208)

This commit is contained in:
Nathan Graves
2018-04-26 11:49:08 -07:00
committed by Lovell Fuller
parent 6d2da2b3ba
commit 5d140d949f
3 changed files with 19 additions and 3 deletions

View File

@@ -326,10 +326,10 @@ function tiff (options) {
}
// compression
if (is.defined(options) && is.defined(options.compression)) {
if (is.string(options.compression) && is.inArray(options.compression, ['lzw', 'deflate', 'jpeg', 'none'])) {
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, none`;
const message = `Invalid compression option "${options.compression}". Should be one of: lzw, deflate, jpeg, ccittfax4, none`;
throw new Error(message);
}
}