Blame html/man/TIFFWriteScanline.3tiff.html

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

TIFFWriteScanline

Packit 7838c8
NAME
Packit 7838c8
SYNOPSIS
Packit 7838c8
DESCRIPTION
Packit 7838c8
NOTES
Packit 7838c8
RETURN VALUES
Packit 7838c8
DIAGNOSTICS
Packit 7838c8
BUGS
Packit 7838c8
SEE ALSO
Packit 7838c8
Packit 7838c8

Packit 7838c8
Packit 7838c8

NAME

Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="2" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

TIFFWriteScanline − write a scanline to an open

Packit 7838c8
<small>TIFF</small> file

Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

SYNOPSIS

Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="2" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

#include <tiffio.h>

Packit 7838c8
Packit 7838c8

int TIFFWriteScanline(TIFF *tif,

Packit 7838c8
tdata_t buf, uint32 row,
Packit 7838c8
tsample_t sample)

Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

DESCRIPTION

Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="2" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

Write data to a file at the specified row. The

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

Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

NOTES

Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="2" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

The library writes encoded data using the native machine

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

Packit 7838c8
Packit 7838c8

In C++ the sample parameter defaults to 0.

Packit 7838c8
Packit 7838c8

Once data are written to a file for the current

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

Packit 7838c8
Packit 7838c8

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

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

Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

RETURN VALUES

Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="2" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

TIFFWriteScanline returns −1 if it

Packit 7838c8
immediately detects an error and 1 for a successful
Packit 7838c8
write.

Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

DIAGNOSTICS

Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="2" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

All error messages are directed to the

Packit 7838c8
TIFFError(3TIFF) routine.

Packit 7838c8
Packit 7838c8

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

Packit 7838c8
opened for reading, not writing.

Packit 7838c8
Packit 7838c8

Can not write scanlines to a tiled image. An

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

Packit 7838c8
Packit 7838c8

Compression algorithm does not support random

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

Packit 7838c8
Packit 7838c8

%s: Must set "ImageWidth" before writing

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

Packit 7838c8
Packit 7838c8

%s: Must set "PlanarConfiguration" before

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

Packit 7838c8
Packit 7838c8

Can not change "ImageLength" when using

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

Packit 7838c8
Packit 7838c8

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

Packit 7838c8
parameter was greater than the value of the SamplesPerPixel
Packit 7838c8
tag.

Packit 7838c8
Packit 7838c8

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

Packit 7838c8
enough space for the arrays that hold strip offsets and byte
Packit 7838c8
counts.

Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

BUGS

Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="2" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

Writing subsampled YCbCR data does not work correctly

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

Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

SEE ALSO

Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="2" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

TIFFOpen(3TIFF),

Packit 7838c8
TIFFWriteEncodedStrip(3TIFF),
Packit 7838c8
TIFFWriteRawStrip(3TIFF), libtiff(3TIFF)

Packit 7838c8
Packit 7838c8

Libtiff library home page:

Packit 7838c8
http://www.simplesystems.org/libtiff/

Packit 7838c8
Packit 7838c8
Packit 7838c8

Packit 7838c8
</body>
Packit 7838c8
</html>