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