Added support for JBIG compression scheme (34661 code) contributed by Lee

Howard. As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=896
This commit is contained in:
Andrey Kiselev 2006-06-07 15:47:43 +00:00
parent bcdfba3f12
commit 9ff07be06c

View File

@ -1,4 +1,4 @@
/* $Id: tiffcp.c,v 1.34 2006-03-21 16:24:33 dron Exp $ */
/* $Id: tiffcp.c,v 1.35 2006-06-07 15:47:43 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -357,6 +357,8 @@ processCompressOptions(char* opt)
if (cp)
defpredictor = atoi(cp+1);
defcompression = COMPRESSION_ADOBE_DEFLATE;
} else if (strneq(opt, "jbig", 4)) {
defcompression = COMPRESSION_JBIG;
} else
return (0);
return (1);
@ -660,6 +662,12 @@ tiffcp(TIFF* in, TIFF* out)
TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
break;
case COMPRESSION_JBIG:
CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG);
CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG);
CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII);
CopyTag(TIFFTAG_FAXDCS, 1, TIFF_ASCII);
break;
case COMPRESSION_LZW:
case COMPRESSION_ADOBE_DEFLATE:
case COMPRESSION_DEFLATE: