From c2d7ef0d2c04eacb822ff00a191cec699f6632b8 Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Thu, 27 Jun 2002 07:41:33 +0000 Subject: [PATCH] Added support for deflate compression. --- man/rgb2ycbcr.1 | 10 ++++++---- tools/rgb2ycbcr.c | 9 ++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/man/rgb2ycbcr.1 b/man/rgb2ycbcr.1 index 12256f96..aaf4f0da 100644 --- a/man/rgb2ycbcr.1 +++ b/man/rgb2ycbcr.1 @@ -1,4 +1,4 @@ -.\" $Header: /cvs/maptools/cvsroot/libtiff/man/rgb2ycbcr.1,v 1.1 1999-07-27 21:50:28 mike Exp $ +.\" $Header: /cvs/maptools/cvsroot/libtiff/man/rgb2ycbcr.1,v 1.2 2002-06-27 07:41:33 dron Exp $ .\" .\" Copyright (c) 1991-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -56,7 +56,7 @@ and .B \-v options. Output data are compressed with the -.SM LZW +.SM PackBits compression scheme, by default; an alternate scheme can be selected with the .B \-c @@ -75,12 +75,14 @@ Specify a compression scheme to use when writing image data: .B "\-c none" for no compression, .B "-c packbits" -for the PackBits compression algorithm, +for the PackBits compression algorithm (the default), .B "-c jpeg" for the JPEG compression algorithm, +.B "-c zip" +for the deflate compression algorithm, and .B "\-c lzw" -for Lempel-Ziv & Welch (the default). +for Lempel-Ziv & Welch. .TP .B \-h Set the horizontal sampling dimension to one of: 1, 2 (default), or 4. diff --git a/tools/rgb2ycbcr.c b/tools/rgb2ycbcr.c index ff8846d1..d3af688a 100644 --- a/tools/rgb2ycbcr.c +++ b/tools/rgb2ycbcr.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/tools/rgb2ycbcr.c,v 1.4 2000-10-19 13:23:49 warmerda Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/tools/rgb2ycbcr.c,v 1.5 2002-06-27 07:41:33 dron Exp $ */ /* * Copyright (c) 1991-1997 Sam Leffler @@ -75,6 +75,8 @@ main(int argc, char* argv[]) compression = COMPRESSION_LZW; else if (streq(optarg, "jpeg")) compression = COMPRESSION_JPEG; + else if (streq(optarg, "zip")) + compression = COMPRESSION_ADOBE_DEFLATE; else usage(); break; @@ -322,8 +324,9 @@ static char* usageMsg[] = { "where comp is one of the following compression algorithms:\n", " jpeg\t\tJPEG encoding\n", " lzw\t\tLempel-Ziv & Welch encoding\n", - " (lzw no longer supported by default due to Unisys patent enforcement)", - " packbits\tPackBits encoding\n", + " (lzw no longer supported by default due to Unisys patent enforcement)\n", + " zip\t\tdeflate encoding\n", + " packbits\tPackBits encoding (default)\n", " none\t\tno compression\n", "and the other options are:\n", " -r\trows/strip\n",