'\" te .TH tiffmedian 1 "26 Mar 2004" "SunOS 5.11" "User Commands" .SH "NAME" tiffmedian \- apply the median cut algorithm to data in a TIFF file .SH "SYNOPSIS" .PP \fBtiffmedian\fR [\fB\fIoptions\fR\fR] \fB\fIinput\&.tif\fR\fR \fB\fIoutput\&.tif\fR\fR .SH "DESCRIPTION" .PP \fBtiffmedian\fR applies the median cut algorithm to an RGB image in \fB\fIinput\&.tif\fR\fR, to generate a palette image that is written to \fB\fIoutput\&.tif\fR\fR\&. The generated colormap has, by default, 256 entries\&. The image data is quantized by mapping each pixel to the closest color values in the colormap\&. .SH "OPTIONS" .PP The following options are supported: .sp .ne 2 .mk \fB-\fBc\fR\fR .in +16n .rt Specify a compression scheme to use when writing image data: .sp .sp .ne 2 .mk \fB-\fBc lzw\fR\fR .in +24n .rt Lempel-Ziv and Welch algorithm\&. .sp .sp 2 .in -24n .sp .ne 2 .mk \fB-\fBc none\fR\fR .in +24n .rt No compression\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fBc packbits\fR\fR .in +24n .rt PackBits compression algorithm\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB-\fBc zip\fR\fR .in +24n .rt Deflate compression algorithm\&. .sp .sp 1 .in -24n If no compression-related option is specified, the input-file compression algorithm is used\&. .sp .sp 0 .in -16n .sp .ne 2 .mk \fB-\fBC\fR\fR .in +16n .rt Specify the number of entries to use in the generated colormap\&. By default, all 256 entries or colors are used\&. .sp .sp 1 .in -16n .sp .ne 2 .mk \fB-\fBf\fR\fR .in +16n .rt Apply Floyd-Steinberg dithering before selecting a colormap entry\&. .sp .sp 1 .in -16n .sp .ne 2 .mk \fB-\fBr\fR\fR .in +16n .rt Write data with a specified number of rows per strip\&. By default, the number of rows per strip is selected so that each strip is approximately 8 kilobytes\&. .sp .sp 1 .in -16n .SH "OPERANDS" .PP The following operands are supported: .sp .ne 2 .mk \fB\fB\fIinput\&.tif\fR\fR\fR .in +16n .rt The name of the input TIFF file\&. .sp .sp 1 .in -16n .sp .ne 2 .mk \fB\fB\fIoutput\&.tif\fR\fR\fR .in +16n .rt The name of the output file\&. .sp .sp 1 .in -16n .SH "EXTENDED DESCRIPTION" .PP LZW compression can be specified together with a predictor value\&. A predictor value of 2 causes each scanline of the output image to undergo horizontal differencing before being encoded\&. A predictor value of 1 forces each scanline to be encoded without differencing\&. .PP LZW-specific options are specified by appending a colon-separated list to the \fBlzw\fR option\&. For example, specify -\fBc\fR \fBlzw:2\fR for LZW compression with horizontal differencing\&. .SH "ATTRIBUTES" .PP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .TS tab() allbox; cw(2.750000i)| cw(2.750000i) lw(2.750000i)| lw(2.750000i). ATTRIBUTE TYPEATTRIBUTE VALUE Availabilityimage/library/libtiff Interface stabilityUncommitted .TE .sp .SH "SEE ALSO" .PP \fIColor Image Quantization for Frame Buffer Display\fR, Paul Heckbert, SIGGRAPH proceedings, 1982, pp\&. 297-307\&. .PP \fBpal2rgb\fR(1), \fBtiffinfo\fR(1), \fBtiffcp\fR(1), \fBtiffcmp\fR(1), \fBlibtiff\fR(3) .SH "NOTES" .PP Updated by Breda McColgan, Sun Microsystems Inc\&., 2004\&. ...\" created by instant / solbook-to-man, Thu 20 Mar 2014, 02:30 ...\" LSARC 2003/085 libtiff, libjpeg, and libpng