Added support for deflate compression.

This commit is contained in:
Andrey Kiselev 2002-06-27 07:41:33 +00:00
parent 6050d390af
commit c2d7ef0d2c
2 changed files with 12 additions and 7 deletions

View File

@ -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 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc. .\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@ -56,7 +56,7 @@ and
.B \-v .B \-v
options. options.
Output data are compressed with the Output data are compressed with the
.SM LZW .SM PackBits
compression scheme, by default; an alternate scheme can be compression scheme, by default; an alternate scheme can be
selected with the selected with the
.B \-c .B \-c
@ -75,12 +75,14 @@ Specify a compression scheme to use when writing image data:
.B "\-c none" .B "\-c none"
for no compression, for no compression,
.B "-c packbits" .B "-c packbits"
for the PackBits compression algorithm, for the PackBits compression algorithm (the default),
.B "-c jpeg" .B "-c jpeg"
for the JPEG compression algorithm, for the JPEG compression algorithm,
.B "-c zip"
for the deflate compression algorithm,
and and
.B "\-c lzw" .B "\-c lzw"
for Lempel-Ziv & Welch (the default). for Lempel-Ziv & Welch.
.TP .TP
.B \-h .B \-h
Set the horizontal sampling dimension to one of: 1, 2 (default), or 4. Set the horizontal sampling dimension to one of: 1, 2 (default), or 4.

View File

@ -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 * Copyright (c) 1991-1997 Sam Leffler
@ -75,6 +75,8 @@ main(int argc, char* argv[])
compression = COMPRESSION_LZW; compression = COMPRESSION_LZW;
else if (streq(optarg, "jpeg")) else if (streq(optarg, "jpeg"))
compression = COMPRESSION_JPEG; compression = COMPRESSION_JPEG;
else if (streq(optarg, "zip"))
compression = COMPRESSION_ADOBE_DEFLATE;
else else
usage(); usage();
break; break;
@ -322,8 +324,9 @@ static char* usageMsg[] = {
"where comp is one of the following compression algorithms:\n", "where comp is one of the following compression algorithms:\n",
" jpeg\t\tJPEG encoding\n", " jpeg\t\tJPEG encoding\n",
" lzw\t\tLempel-Ziv & Welch encoding\n", " lzw\t\tLempel-Ziv & Welch encoding\n",
" (lzw no longer supported by default due to Unisys patent enforcement)", " (lzw no longer supported by default due to Unisys patent enforcement)\n",
" packbits\tPackBits encoding\n", " zip\t\tdeflate encoding\n",
" packbits\tPackBits encoding (default)\n",
" none\t\tno compression\n", " none\t\tno compression\n",
"and the other options are:\n", "and the other options are:\n",
" -r\trows/strip\n", " -r\trows/strip\n",