|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
<meta content="groff -Thtml, see www.gnu.org" name="generator">
|
|
roentgen |
b75cab |
<meta content="text/css" name="Content-Style">
|
|
roentgen |
b75cab |
<title>TIFFWriteScanline</title>
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
TIFFWriteScanline
|
|
roentgen |
b75cab |
NAME
|
|
roentgen |
b75cab |
SYNOPSIS
|
|
roentgen |
b75cab |
DESCRIPTION
|
|
roentgen |
b75cab |
NOTES
|
|
roentgen |
b75cab |
RETURN VALUES
|
|
roentgen |
b75cab |
DIAGNOSTICS
|
|
roentgen |
b75cab |
BUGS
|
|
roentgen |
b75cab |
SEE ALSO
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
NAME
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
cols="2" cellspacing="0" cellpadding="0">
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
TIFFWriteScanline − write a scanline to an open
|
|
roentgen |
b75cab |
<small>TIFF</small> file
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
SYNOPSIS
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
cols="2" cellspacing="0" cellpadding="0">
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
#include <tiffio.h>
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
int TIFFWriteScanline(TIFF *tif,
|
|
roentgen |
b75cab |
tdata_t buf, uint32 row,
|
|
roentgen |
b75cab |
tsample_t sample)
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
DESCRIPTION
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
cols="2" cellspacing="0" cellpadding="0">
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
Write data to a file at the specified row. The
|
|
roentgen |
b75cab |
sample parameter is used only if data are organized
|
|
roentgen |
b75cab |
in separate planes (PlanarConfiguration=2). The data
|
|
roentgen |
b75cab |
are assumed to be uncompressed and in the native bit- and
|
|
roentgen |
b75cab |
byte-order of the host machine. The data written to the file
|
|
roentgen |
b75cab |
is compressed according to the compression scheme of the
|
|
roentgen |
b75cab |
current <small>TIFF</small> directory (see further below).
|
|
roentgen |
b75cab |
If the current scanline is past the end of the current
|
|
roentgen |
b75cab |
subfile, the ImageLength field is automatically
|
|
roentgen |
b75cab |
increased to include the scanline (except for
|
|
roentgen |
b75cab |
PlanarConfiguration=2, where the ImageLength
|
|
roentgen |
b75cab |
cannot be changed once the first data are written). If the
|
|
roentgen |
b75cab |
ImageLength is increased, the StripOffsets and
|
|
roentgen |
b75cab |
StripByteCounts fields are similarly enlarged to
|
|
roentgen |
b75cab |
reflect data written past the previous end of image.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
NOTES
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
cols="2" cellspacing="0" cellpadding="0">
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
The library writes encoded data using the native machine
|
|
roentgen |
b75cab |
byte order. Correctly implemented <small>TIFF</small>
|
|
roentgen |
b75cab |
readers are expected to do any necessary byte-swapping to
|
|
roentgen |
b75cab |
correctly process image data with BitsPerSample greater than
|
|
roentgen |
b75cab |
8. The library attempts to hide bit-ordering differences
|
|
roentgen |
b75cab |
between the image and the native machine by converting data
|
|
roentgen |
b75cab |
from the native machine order.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
In C++ the sample parameter defaults to 0.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
Once data are written to a file for the current
|
|
roentgen |
b75cab |
directory, the values of certain tags may not be altered;
|
|
roentgen |
b75cab |
see TIFFSetField(3TIFF) for more information.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
It is not possible to write scanlines to a file that uses
|
|
roentgen |
b75cab |
a tiled organization. The routine TIFFIsTiled can be
|
|
roentgen |
b75cab |
used to determine if the file is organized as tiles or
|
|
roentgen |
b75cab |
strips.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
RETURN VALUES
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
cols="2" cellspacing="0" cellpadding="0">
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
TIFFWriteScanline returns −1 if it
|
|
roentgen |
b75cab |
immediately detects an error and 1 for a successful
|
|
roentgen |
b75cab |
write.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
DIAGNOSTICS
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
cols="2" cellspacing="0" cellpadding="0">
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
All error messages are directed to the
|
|
roentgen |
b75cab |
TIFFError(3TIFF) routine.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
%s: File not open for writing . The file was
|
|
roentgen |
b75cab |
opened for reading, not writing.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
Can not write scanlines to a tiled image. An
|
|
roentgen |
b75cab |
attempt was made to write a scanline to a tiled image. The
|
|
roentgen |
b75cab |
image is assumed to be organized in tiles because the
|
|
roentgen |
b75cab |
TileWidth and TileLength tags have been set
|
|
roentgen |
b75cab |
with TIFFSetField(3TIFF).
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
Compression algorithm does not support random
|
|
roentgen |
b75cab |
access. Data was written in a non-sequential order to a
|
|
roentgen |
b75cab |
file that uses a compression algorithm and that has
|
|
roentgen |
b75cab |
RowsPerStrip greater than one. That is, data in the
|
|
roentgen |
b75cab |
image is to be stored in a compressed form, and with
|
|
roentgen |
b75cab |
multiple rows packed into a strip. In this case, the library
|
|
roentgen |
b75cab |
does not support random access to the data. The data should
|
|
roentgen |
b75cab |
either be written as entire strips, sequentially by rows, or
|
|
roentgen |
b75cab |
the value of RowsPerStrip should be set to one.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
%s: Must set "ImageWidth" before writing
|
|
roentgen |
b75cab |
data. The image’s width has not be set before the
|
|
roentgen |
b75cab |
first write. See TIFFSetField(3TIFF) for information
|
|
roentgen |
b75cab |
on how to do this.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
%s: Must set "PlanarConfiguration" before
|
|
roentgen |
b75cab |
writing data. The organization of data has not be
|
|
roentgen |
b75cab |
defined before the first write. See
|
|
roentgen |
b75cab |
TIFFSetField(3TIFF) for information on how to do
|
|
roentgen |
b75cab |
this.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
Can not change "ImageLength" when using
|
|
roentgen |
b75cab |
separate planes. Separate image planes are being used
|
|
roentgen |
b75cab |
(PlanarConfiguration=2), but the number of rows has
|
|
roentgen |
b75cab |
not been specified before the first write. The library
|
|
roentgen |
b75cab |
supports the dynamic growth of an image only when data are
|
|
roentgen |
b75cab |
organized in a contiguous manner
|
|
roentgen |
b75cab |
(PlanarConfiguration=1).
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
%d: Sample out of range, max %d. The sample
|
|
roentgen |
b75cab |
parameter was greater than the value of the SamplesPerPixel
|
|
roentgen |
b75cab |
tag.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
%s: No space for strip arrays . There was not
|
|
roentgen |
b75cab |
enough space for the arrays that hold strip offsets and byte
|
|
roentgen |
b75cab |
counts.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
BUGS
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
cols="2" cellspacing="0" cellpadding="0">
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
Writing subsampled YCbCR data does not work correctly
|
|
roentgen |
b75cab |
because, for PlanarConfiguration=2 the size of a
|
|
roentgen |
b75cab |
scanline is not calculated on a per-sample basis, and for
|
|
roentgen |
b75cab |
PlanarConfiguration=1 the library does not pack the
|
|
roentgen |
b75cab |
block-interleaved samples.
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
SEE ALSO
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
cols="2" cellspacing="0" cellpadding="0">
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
TIFFOpen(3TIFF),
|
|
roentgen |
b75cab |
TIFFWriteEncodedStrip(3TIFF),
|
|
roentgen |
b75cab |
TIFFWriteRawStrip(3TIFF), libtiff(3TIFF)
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
Libtiff library home page:
|
|
roentgen |
b75cab |
http://www.remotesensing.org/libtiff/
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|
|
roentgen |
b75cab |
|