Blame html/man/TIFFWriteScanline.3tiff.html

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
<html>
Packit Service 2594b8
<head>
Packit Service 2594b8
<meta name="generator" content="groff -Thtml, see www.gnu.org">
Packit Service 2594b8
<meta name="Content-Style" content="text/css">
Packit Service 2594b8
<title>TIFFWriteScanline</title>
Packit Service 2594b8
</head>
Packit Service 2594b8
<body>
Packit Service 2594b8
Packit Service 2594b8

TIFFWriteScanline

Packit Service 2594b8
NAME
Packit Service 2594b8
SYNOPSIS
Packit Service 2594b8
DESCRIPTION
Packit Service 2594b8
NOTES
Packit Service 2594b8
RETURN VALUES
Packit Service 2594b8
DIAGNOSTICS
Packit Service 2594b8
BUGS
Packit Service 2594b8
SEE ALSO
Packit Service 2594b8
Packit Service 2594b8

Packit Service 2594b8
Packit Service 2594b8

NAME

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="2" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

TIFFWriteScanline − write a scanline to an open

Packit Service 2594b8
<small>TIFF</small> file

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

SYNOPSIS

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="2" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

#include <tiffio.h>

Packit Service 2594b8
Packit Service 2594b8

int TIFFWriteScanline(TIFF *tif,

Packit Service 2594b8
tdata_t buf, uint32 row,
Packit Service 2594b8
tsample_t sample)

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

DESCRIPTION

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="2" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

Write data to a file at the specified row. The

Packit Service 2594b8
sample parameter is used only if data are organized
Packit Service 2594b8
in separate planes (PlanarConfiguration=2). The data
Packit Service 2594b8
are assumed to be uncompressed and in the native bit- and
Packit Service 2594b8
byte-order of the host machine. The data written to the file
Packit Service 2594b8
is compressed according to the compression scheme of the
Packit Service 2594b8
current <small>TIFF</small> directory (see further below).
Packit Service 2594b8
If the current scanline is past the end of the current
Packit Service 2594b8
subfile, the ImageLength field is automatically
Packit Service 2594b8
increased to include the scanline (except for
Packit Service 2594b8
PlanarConfiguration=2, where the ImageLength
Packit Service 2594b8
cannot be changed once the first data are written). If the
Packit Service 2594b8
ImageLength is increased, the StripOffsets and
Packit Service 2594b8
StripByteCounts fields are similarly enlarged to
Packit Service 2594b8
reflect data written past the previous end of image.

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

NOTES

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="2" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

The library writes encoded data using the native machine

Packit Service 2594b8
byte order. Correctly implemented <small>TIFF</small>
Packit Service 2594b8
readers are expected to do any necessary byte-swapping to
Packit Service 2594b8
correctly process image data with BitsPerSample greater than
Packit Service 2594b8
8. The library attempts to hide bit-ordering differences
Packit Service 2594b8
between the image and the native machine by converting data
Packit Service 2594b8
from the native machine order.

Packit Service 2594b8
Packit Service 2594b8

In C++ the sample parameter defaults to 0.

Packit Service 2594b8
Packit Service 2594b8

Once data are written to a file for the current

Packit Service 2594b8
directory, the values of certain tags may not be altered;
Packit Service 2594b8
see TIFFSetField(3TIFF) for more information.

Packit Service 2594b8
Packit Service 2594b8

It is not possible to write scanlines to a file that uses

Packit Service 2594b8
a tiled organization. The routine TIFFIsTiled can be
Packit Service 2594b8
used to determine if the file is organized as tiles or
Packit Service 2594b8
strips.

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

RETURN VALUES

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="2" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

TIFFWriteScanline returns −1 if it

Packit Service 2594b8
immediately detects an error and 1 for a successful
Packit Service 2594b8
write.

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

DIAGNOSTICS

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="2" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

All error messages are directed to the

Packit Service 2594b8
TIFFError(3TIFF) routine.

Packit Service 2594b8
Packit Service 2594b8

%s: File not open for writing . The file was

Packit Service 2594b8
opened for reading, not writing.

Packit Service 2594b8
Packit Service 2594b8

Can not write scanlines to a tiled image. An

Packit Service 2594b8
attempt was made to write a scanline to a tiled image. The
Packit Service 2594b8
image is assumed to be organized in tiles because the
Packit Service 2594b8
TileWidth and TileLength tags have been set
Packit Service 2594b8
with TIFFSetField(3TIFF).

Packit Service 2594b8
Packit Service 2594b8

Compression algorithm does not support random

Packit Service 2594b8
access. Data was written in a non-sequential order to a
Packit Service 2594b8
file that uses a compression algorithm and that has
Packit Service 2594b8
RowsPerStrip greater than one. That is, data in the
Packit Service 2594b8
image is to be stored in a compressed form, and with
Packit Service 2594b8
multiple rows packed into a strip. In this case, the library
Packit Service 2594b8
does not support random access to the data. The data should
Packit Service 2594b8
either be written as entire strips, sequentially by rows, or
Packit Service 2594b8
the value of RowsPerStrip should be set to one.

Packit Service 2594b8
Packit Service 2594b8

%s: Must set "ImageWidth" before writing

Packit Service 2594b8
data. The image’s width has not be set before the
Packit Service 2594b8
first write. See TIFFSetField(3TIFF) for information
Packit Service 2594b8
on how to do this.

Packit Service 2594b8
Packit Service 2594b8

%s: Must set "PlanarConfiguration" before

Packit Service 2594b8
writing data. The organization of data has not be
Packit Service 2594b8
defined before the first write. See
Packit Service 2594b8
TIFFSetField(3TIFF) for information on how to do
Packit Service 2594b8
this.

Packit Service 2594b8
Packit Service 2594b8

Can not change "ImageLength" when using

Packit Service 2594b8
separate planes. Separate image planes are being used
Packit Service 2594b8
(PlanarConfiguration=2), but the number of rows has
Packit Service 2594b8
not been specified before the first write. The library
Packit Service 2594b8
supports the dynamic growth of an image only when data are
Packit Service 2594b8
organized in a contiguous manner
Packit Service 2594b8
(PlanarConfiguration=1).

Packit Service 2594b8
Packit Service 2594b8

%d: Sample out of range, max %d. The sample

Packit Service 2594b8
parameter was greater than the value of the SamplesPerPixel
Packit Service 2594b8
tag.

Packit Service 2594b8
Packit Service 2594b8

%s: No space for strip arrays . There was not

Packit Service 2594b8
enough space for the arrays that hold strip offsets and byte
Packit Service 2594b8
counts.

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

BUGS

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="2" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

Writing subsampled YCbCR data does not work correctly

Packit Service 2594b8
because, for PlanarConfiguration=2 the size of a
Packit Service 2594b8
scanline is not calculated on a per-sample basis, and for
Packit Service 2594b8
PlanarConfiguration=1 the library does not pack the
Packit Service 2594b8
block-interleaved samples.

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

SEE ALSO

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="2" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

TIFFOpen(3TIFF),

Packit Service 2594b8
TIFFWriteEncodedStrip(3TIFF),
Packit Service 2594b8
TIFFWriteRawStrip(3TIFF), libtiff(3TIFF)

Packit Service 2594b8
Packit Service 2594b8

Libtiff library home page:

Packit Service 2594b8
http://www.simplesystems.org/libtiff/

Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

Packit Service 2594b8
</body>
Packit Service 2594b8
</html>