From 9ff07be06cea75030b8e15ec65d2d79d5c3a7ea5 Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Wed, 7 Jun 2006 15:47:43 +0000 Subject: [PATCH] Added support for JBIG compression scheme (34661 code) contributed by Lee Howard. As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=896 --- tools/tiffcp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/tiffcp.c b/tools/tiffcp.c index ed0b322c..3559a4c1 100644 --- a/tools/tiffcp.c +++ b/tools/tiffcp.c @@ -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: