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