Blame html/man/TIFFReadRGBAStrip.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>TIFFReadRGBAStrip</title>
Packit Service 2594b8
</head>
Packit Service 2594b8
<body>
Packit Service 2594b8
Packit Service 2594b8

TIFFReadRGBAStrip

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
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

TIFFReadRGBAStrip − read and decode an image strip

Packit Service 2594b8
into a fixed-format raster

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

#define TIFFGetR(abgr) ((abgr) & 0xff)

Packit Service 2594b8
#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)
Packit Service 2594b8
#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)
Packit Service 2594b8
#define TIFFGetA(abgr) (((abgr) >> 24) &
Packit Service 2594b8
0xff)

Packit Service 2594b8
Packit Service 2594b8

int TIFFReadRGBAStrip(TIFF *tif,

Packit Service 2594b8
uint32 row, uint32
Packit Service 2594b8
*raster)

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

TIFFReadRGBAStrip reads a single strip of a

Packit Service 2594b8
strip-based image into memory, storing the result in the
Packit Service 2594b8
user supplied RGBA raster. The raster is assumed to
Packit Service 2594b8
be an array of width times rowsperstrip 32-bit entries,
Packit Service 2594b8
where width is the width of the image (TIFFTAG_IMAGEWIDTH)
Packit Service 2594b8
and rowsperstrip is the maximum lines in a strip
Packit Service 2594b8
(TIFFTAG_ROWSPERSTRIP).

Packit Service 2594b8
Packit Service 2594b8

The row value should be the row of the first row

Packit Service 2594b8
in the strip (strip * rowsperstrip, zero based).

Packit Service 2594b8
Packit Service 2594b8

Note that the raster is assume to be organized such that

Packit Service 2594b8
the pixel at location (x,y) is
Packit Service 2594b8
raster[y*width+x]; with the
Packit Service 2594b8
raster origin in the lower-left hand corner of the
Packit Service 2594b8
strip. That is bottom to top organization. When reading a
Packit Service 2594b8
partial last strip in the file the last line of the image
Packit Service 2594b8
will begin at the beginning of the buffer.

Packit Service 2594b8
Packit Service 2594b8

Raster pixels are 8-bit packed red, green, blue, alpha

Packit Service 2594b8
samples. The macros TIFFGetR, TIFFGetG,
Packit Service 2594b8
TIFFGetB, and TIFFGetA should be used to
Packit Service 2594b8
access individual samples. Images without Associated Alpha
Packit Service 2594b8
matting information have a constant Alpha of 1.0 (255).

Packit Service 2594b8
Packit Service 2594b8

See the TIFFRGBAImage(3TIFF) page for more details

Packit Service 2594b8
on how various image types are converted to RGBA values.

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

Samples must be either 1, 2, 4, 8, or 16 bits.

Packit Service 2594b8
Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
Packit Service 2594b8
SamplesPerPixel minus ExtraSamples).

Packit Service 2594b8
Packit Service 2594b8

Palette image colormaps that appear to be incorrectly

Packit Service 2594b8
written as 8-bit values are automatically scaled to
Packit Service 2594b8
16-bits.

Packit Service 2594b8
Packit Service 2594b8

TIFFReadRGBAStrip is just a wrapper around the

Packit Service 2594b8
more general TIFFRGBAImage(3TIFF) facilities.
Packit Service 2594b8
It’s main advantage over the similar
Packit Service 2594b8
TIFFReadRGBAImage() function is that for large images
Packit Service 2594b8
a single buffer capable of holding the whole image
Packit Service 2594b8
doesn’t need to be allocated, only enough for one
Packit Service 2594b8
strip. The TIFFReadRGBATile() function does a similar
Packit Service 2594b8
operation for tiled images.

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

1 is returned if the image was successfully read and

Packit Service 2594b8
converted. Otherwise, 0 is returned if an error was
Packit Service 2594b8
encountered.

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

Sorry, can not handle %d-bit pictures. The image

Packit Service 2594b8
had BitsPerSample other than 1, 2, 4, 8, or 16.

Packit Service 2594b8
Packit Service 2594b8

Sorry, can not handle %d-channel images. The image

Packit Service 2594b8
had SamplesPerPixel other than 1, 3, or 4.

Packit Service 2594b8
Packit Service 2594b8

Missing needed "PhotometricInterpretation"

Packit Service 2594b8
tag. The image did not have a tag that describes how to
Packit Service 2594b8
display the data.

Packit Service 2594b8
Packit Service 2594b8

No "PhotometricInterpretation" tag, assuming

Packit Service 2594b8
RGB. The image was missing a tag that describes how to
Packit Service 2594b8
display it, but because it has 3 or 4 samples/pixel, it is
Packit Service 2594b8
assumed to be <small>RGB.</small>

Packit Service 2594b8
Packit Service 2594b8

No "PhotometricInterpretation" tag, assuming

Packit Service 2594b8
min-is-black. The image was missing a tag that describes
Packit Service 2594b8
how to display it, but because it has 1 sample/pixel, it is
Packit Service 2594b8
assumed to be a grayscale or bilevel image.

Packit Service 2594b8
Packit Service 2594b8

No space for photometric conversion table. There

Packit Service 2594b8
was insufficient memory for a table used to convert image
Packit Service 2594b8
samples to 8-bit <small>RGB.</small>

Packit Service 2594b8
Packit Service 2594b8

Missing required "Colormap" tag. A

Packit Service 2594b8
Palette image did not have a required Colormap
Packit Service 2594b8
tag.

Packit Service 2594b8
Packit Service 2594b8

No space for tile buffer. There was insufficient

Packit Service 2594b8
memory to allocate an i/o buffer.

Packit Service 2594b8
Packit Service 2594b8

No space for strip buffer. There was insufficient

Packit Service 2594b8
memory to allocate an i/o buffer.

Packit Service 2594b8
Packit Service 2594b8

Can not handle format. The image has a format

Packit Service 2594b8
(combination of BitsPerSample,
Packit Service 2594b8
SamplesPerPixel, and
Packit Service 2594b8
PhotometricInterpretation) that
Packit Service 2594b8
TIFFReadRGBAImage can not handle.

Packit Service 2594b8
Packit Service 2594b8

No space for B&W mapping table. There was

Packit Service 2594b8
insufficient memory to allocate a table used to map
Packit Service 2594b8
grayscale data to <small>RGB.</small>

Packit Service 2594b8
Packit Service 2594b8

No space for Palette mapping table. There was

Packit Service 2594b8
insufficient memory to allocate a table used to map data to
Packit Service 2594b8
8-bit <small>RGB.</small>

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), TIFFRGBAImage(3TIFF),

Packit Service 2594b8
TIFFReadRGBAImage(3TIFF),
Packit Service 2594b8
TIFFReadRGBATile(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>