2009-08-24 15:13:40 -04:00
|
|
|
.\" $Id: raw2tiff.1,v 1.7 2009-08-24 19:13:40 bfriesen Exp $
|
2002-09-15 12:44:52 -04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1990-1997 Sam Leffler
|
|
|
|
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
|
|
|
.\"
|
|
|
|
.\" Permission to use, copy, modify, distribute, and sell this software and
|
|
|
|
.\" its documentation for any purpose is hereby granted without fee, provided
|
|
|
|
.\" that (i) the above copyright notices and this permission notice appear in
|
|
|
|
.\" all copies of the software and related documentation, and (ii) the names of
|
|
|
|
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
|
|
|
|
.\" publicity relating to the software without the specific, prior written
|
|
|
|
.\" permission of Sam Leffler and Silicon Graphics.
|
|
|
|
.\"
|
|
|
|
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
|
|
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
.\"
|
|
|
|
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
|
|
|
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
|
|
|
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
|
|
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
|
|
|
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
|
|
.\" OF THIS SOFTWARE.
|
|
|
|
.\"
|
|
|
|
.if n .po 0
|
2005-11-02 06:07:18 -05:00
|
|
|
.TH RAW2TIFF 1 "November 2, 2005" "libtiff"
|
2002-09-15 12:44:52 -04:00
|
|
|
.SH NAME
|
|
|
|
raw2tiff \- create a
|
|
|
|
.SM TIFF
|
|
|
|
file from a raw data
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B raw2tiff
|
|
|
|
[
|
|
|
|
.I options
|
|
|
|
]
|
|
|
|
.I input.raw
|
|
|
|
.I output.tif
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.I raw2tiff
|
|
|
|
converts a raw byte sequence into
|
|
|
|
.SM TIFF.
|
|
|
|
By default, the
|
|
|
|
.SM TIFF
|
|
|
|
image is created with data samples packed (\c
|
|
|
|
.IR PlanarConfiguration =1),
|
|
|
|
compressed with the PackBits algorithm (\c
|
2006-04-20 08:17:19 -04:00
|
|
|
.IR Compression =32773),
|
2002-09-15 12:44:52 -04:00
|
|
|
and with each strip no more than 8 kilobytes.
|
|
|
|
These characteristics can overridden, or explicitly specified
|
|
|
|
with the options described below.
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2006-04-20 08:17:19 -04:00
|
|
|
.BI \-H " number"
|
2002-09-15 12:44:52 -04:00
|
|
|
size of input image file header in bytes (0 by default). This amount of data
|
|
|
|
just will be skipped from the start of file while reading.
|
|
|
|
.TP
|
2006-04-20 08:17:19 -04:00
|
|
|
.BI \-w " number"
|
2003-11-12 04:20:10 -05:00
|
|
|
width of input image in pixels (can be guessed, see
|
|
|
|
.SM
|
|
|
|
.B "GUESSING THE IMAGE GEOMETRY"
|
|
|
|
below).
|
2002-09-15 12:44:52 -04:00
|
|
|
.TP
|
2006-04-20 08:17:19 -04:00
|
|
|
.BI \-l " number"
|
|
|
|
length of input image in lines (can be guessed, see
|
2003-11-12 04:20:10 -05:00
|
|
|
.SM
|
|
|
|
.B "GUESSING THE IMAGE GEOMETRY"
|
|
|
|
below).
|
2002-09-15 12:44:52 -04:00
|
|
|
.TP
|
2006-04-20 08:17:19 -04:00
|
|
|
.BI \-b " number"
|
2002-09-15 12:44:52 -04:00
|
|
|
number of bands in input image (1 by default).
|
|
|
|
.TP
|
2006-04-20 08:17:19 -04:00
|
|
|
.BI \-d " data_type"
|
2002-09-15 12:44:52 -04:00
|
|
|
type of samples in input image, where
|
2006-04-20 08:17:19 -04:00
|
|
|
.I data_type
|
2002-09-15 12:44:52 -04:00
|
|
|
may be:
|
2006-04-20 08:17:19 -04:00
|
|
|
.ta \w'\fBdouble \fR'u
|
2002-09-15 12:44:52 -04:00
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B byte\t
|
2002-09-15 12:44:52 -04:00
|
|
|
8-bit unsigned integer (default),
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B short\t
|
2002-09-15 12:44:52 -04:00
|
|
|
16-bit unsigned integer,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B long\t
|
2002-09-15 12:44:52 -04:00
|
|
|
32-bit unsigned integer,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B sbyte\t
|
2002-09-15 12:44:52 -04:00
|
|
|
8-bit signed integer,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B sshort\t
|
2002-09-15 12:44:52 -04:00
|
|
|
16-bit signed integer,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B slong\t
|
2002-09-15 12:44:52 -04:00
|
|
|
32-bit signed integer,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B float\t
|
2002-09-15 12:44:52 -04:00
|
|
|
32-bit IEEE floating point,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B double\t
|
|
|
|
64-bit IEEE floating point.
|
2002-09-15 12:44:52 -04:00
|
|
|
.TP
|
2006-04-20 08:17:19 -04:00
|
|
|
.BI \-i " config"
|
2002-09-15 12:44:52 -04:00
|
|
|
type of samples interleaving in input image, where
|
2006-04-20 08:17:19 -04:00
|
|
|
.I config
|
2002-09-15 12:44:52 -04:00
|
|
|
may be:
|
2006-04-20 08:17:19 -04:00
|
|
|
.ta \w'\fBpixel \fR'u
|
2002-09-15 12:44:52 -04:00
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B pixel\t
|
2002-09-15 12:44:52 -04:00
|
|
|
pixel interleaved data (default),
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B band\t
|
2002-09-15 12:44:52 -04:00
|
|
|
band interleaved data.
|
|
|
|
.TP
|
2006-04-20 08:17:19 -04:00
|
|
|
.BI \-p " photo"
|
2003-07-10 16:04:42 -04:00
|
|
|
photometric interpretation (color space) of the input image, where
|
2006-04-20 08:17:19 -04:00
|
|
|
.I photo
|
2003-07-10 16:04:42 -04:00
|
|
|
may be:
|
2006-04-20 08:17:19 -04:00
|
|
|
.ta \w'\fBminiswhite \fR'u
|
2003-07-10 16:04:42 -04:00
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B miniswhite\t
|
2003-07-10 16:04:42 -04:00
|
|
|
white color represented with 0 value,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B minisblack\t
|
2003-07-10 16:04:42 -04:00
|
|
|
black color represented with 0 value (default),
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B rgb\t
|
2003-07-10 16:04:42 -04:00
|
|
|
image has RGB color model,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B cmyk\t
|
2003-07-10 16:04:42 -04:00
|
|
|
image has CMYK (separated) color model,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B ycbcr\t
|
2003-07-10 16:04:42 -04:00
|
|
|
image has YCbCr color model,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B cielab\t
|
2003-07-10 16:04:42 -04:00
|
|
|
image has CIE L*a*b color model,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B icclab\t
|
2003-07-10 16:04:42 -04:00
|
|
|
image has ICC L*a*b color model,
|
|
|
|
.br
|
2006-04-20 08:17:19 -04:00
|
|
|
.B itulab\t
|
|
|
|
image has ITU L*a*b color model.
|
2003-07-10 16:04:42 -04:00
|
|
|
.TP
|
2002-09-15 12:44:52 -04:00
|
|
|
.B \-s
|
|
|
|
swap bytes fetched from the input file.
|
|
|
|
.TP
|
|
|
|
.B \-L
|
|
|
|
input data has LSB2MSB bit order (default).
|
|
|
|
.TP
|
|
|
|
.B \-M
|
|
|
|
input data has MSB2LSB bit order.
|
|
|
|
.TP
|
|
|
|
.B \-c
|
|
|
|
Specify a compression scheme to use when writing image data:
|
|
|
|
.B "\-c none"
|
|
|
|
for no compression,
|
2006-04-20 08:17:19 -04:00
|
|
|
.B "\-c packbits"
|
2002-09-15 12:44:52 -04:00
|
|
|
for the PackBits compression algorithm (the default),
|
2006-04-20 08:17:19 -04:00
|
|
|
.B "\-c jpeg"
|
2002-09-15 12:44:52 -04:00
|
|
|
for the baseline JPEG compression algorithm,
|
2006-04-20 08:17:19 -04:00
|
|
|
.B "\-c zip"
|
2002-09-15 12:44:52 -04:00
|
|
|
for the Deflate compression algorithm,
|
|
|
|
and
|
|
|
|
.B "\-c lzw"
|
|
|
|
for Lempel-Ziv & Welch.
|
|
|
|
.TP
|
2006-04-20 08:17:19 -04:00
|
|
|
.BI \-r " number"
|
2002-09-15 12:44:52 -04:00
|
|
|
Write data with a specified number of rows per strip;
|
|
|
|
by default the number of rows/strip is selected so that each strip
|
|
|
|
is approximately 8 kilobytes.
|
2003-11-12 04:20:10 -05:00
|
|
|
.SH GUESSING THE IMAGE GEOMETRY
|
|
|
|
.I raw2tiff
|
|
|
|
can guess image width and height in case one or both of these parameters are
|
|
|
|
not specified. If you omit one of those parameters, the complementary one will
|
|
|
|
be calculated based on the file size (taking into account header size, number
|
|
|
|
of bands and data type). If you omit both parameters, the statistical approach
|
|
|
|
will be used. Utility will compute correlation coefficient between two lines
|
|
|
|
at the image center using several appropriate line sizes and the highest
|
|
|
|
absolute value of the coefficient will indicate the right line size. That is
|
|
|
|
why you should be cautious with the very large images, because guessing
|
2005-09-20 06:07:55 -04:00
|
|
|
process may take a while (depending on your system performance). Of course, the
|
2003-11-12 04:20:10 -05:00
|
|
|
utility can't guess the header size, number of bands and data type, so it
|
|
|
|
should be specified manually. If you don't know anything about your image,
|
|
|
|
just try with the several combinations of those options.
|
|
|
|
.P
|
|
|
|
There is no magic, it is just a mathematical statistics, so it can be wrong
|
|
|
|
in some cases. But for most ordinary images guessing method will work fine.
|
2002-09-15 12:44:52 -04:00
|
|
|
.SH "SEE ALSO"
|
2005-11-02 06:07:18 -05:00
|
|
|
.BR pal2rgb (1),
|
2009-08-24 15:13:40 -04:00
|
|
|
.BR tiffinfo (1),
|
2005-11-02 06:07:18 -05:00
|
|
|
.BR tiffcp (1),
|
|
|
|
.BR tiffmedian (1),
|
|
|
|
.BR libtiff (3)
|
|
|
|
.PP
|
|
|
|
Libtiff library home page:
|
|
|
|
.BR http://www.remotesensing.org/libtiff/
|