Blame html/man/TIFFReadRGBAStrip.3tiff.html

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

TIFFReadRGBAStrip

Packit 994f1a
NAME
Packit 994f1a
SYNOPSIS
Packit 994f1a
DESCRIPTION
Packit 994f1a
NOTES
Packit 994f1a
RETURN VALUES
Packit 994f1a
DIAGNOSTICS
Packit 994f1a
SEE ALSO
Packit 994f1a
Packit 994f1a

Packit 994f1a
Packit 994f1a

NAME

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

TIFFReadRGBAStrip − read and decode an image strip

Packit 994f1a
into a fixed-format raster

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

SYNOPSIS

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

#include <tiffio.h>

Packit 994f1a
Packit 994f1a

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

Packit 994f1a
#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)
Packit 994f1a
#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)
Packit 994f1a
#define TIFFGetA(abgr) (((abgr) >> 24) &
Packit 994f1a
0xff)

Packit 994f1a
Packit 994f1a

int TIFFReadRGBAStrip(TIFF *tif,

Packit 994f1a
uint32 row, uint32
Packit 994f1a
*raster)

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

DESCRIPTION

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

TIFFReadRGBAStrip reads a single strip of a

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

Packit 994f1a
Packit 994f1a

The row value should be the row of the first row

Packit 994f1a
in the strip (strip * rowsperstrip, zero based).

Packit 994f1a
Packit 994f1a

Note that the raster is assume to be organized such that

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

Packit 994f1a
Packit 994f1a

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

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

Packit 994f1a
Packit 994f1a

See the TIFFRGBAImage(3TIFF) page for more details

Packit 994f1a
on how various image types are converted to RGBA values.

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

NOTES

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

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

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

Packit 994f1a
Packit 994f1a

Palette image colormaps that appear to be incorrectly

Packit 994f1a
written as 8-bit values are automatically scaled to
Packit 994f1a
16-bits.

Packit 994f1a
Packit 994f1a

TIFFReadRGBAStrip is just a wrapper around the

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

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

RETURN VALUES

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

1 is returned if the image was successfully read and

Packit 994f1a
converted. Otherwise, 0 is returned if an error was
Packit 994f1a
encountered.

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

DIAGNOSTICS

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

All error messages are directed to the

Packit 994f1a
TIFFError(3TIFF) routine.

Packit 994f1a
Packit 994f1a

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

Packit 994f1a
had BitsPerSample other than 1, 2, 4, 8, or 16.

Packit 994f1a
Packit 994f1a

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

Packit 994f1a
had SamplesPerPixel other than 1, 3, or 4.

Packit 994f1a
Packit 994f1a

Missing needed "PhotometricInterpretation"

Packit 994f1a
tag. The image did not have a tag that describes how to
Packit 994f1a
display the data.

Packit 994f1a
Packit 994f1a

No "PhotometricInterpretation" tag, assuming

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

Packit 994f1a
Packit 994f1a

No "PhotometricInterpretation" tag, assuming

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

Packit 994f1a
Packit 994f1a

No space for photometric conversion table. There

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

Packit 994f1a
Packit 994f1a

Missing required "Colormap" tag. A

Packit 994f1a
Palette image did not have a required Colormap
Packit 994f1a
tag.

Packit 994f1a
Packit 994f1a

No space for tile buffer. There was insufficient

Packit 994f1a
memory to allocate an i/o buffer.

Packit 994f1a
Packit 994f1a

No space for strip buffer. There was insufficient

Packit 994f1a
memory to allocate an i/o buffer.

Packit 994f1a
Packit 994f1a

Can not handle format. The image has a format

Packit 994f1a
(combination of BitsPerSample,
Packit 994f1a
SamplesPerPixel, and
Packit 994f1a
PhotometricInterpretation) that
Packit 994f1a
TIFFReadRGBAImage can not handle.

Packit 994f1a
Packit 994f1a

No space for B&W mapping table. There was

Packit 994f1a
insufficient memory to allocate a table used to map
Packit 994f1a
grayscale data to <small>RGB.</small>

Packit 994f1a
Packit 994f1a

No space for Palette mapping table. There was

Packit 994f1a
insufficient memory to allocate a table used to map data to
Packit 994f1a
8-bit <small>RGB.</small>

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

SEE ALSO

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

TIFFOpen(3TIFF), TIFFRGBAImage(3TIFF),

Packit 994f1a
TIFFReadRGBAImage(3TIFF),
Packit 994f1a
TIFFReadRGBATile(3TIFF), libtiff(3TIFF)

Packit 994f1a
Packit 994f1a

Libtiff library home page:

Packit 994f1a
http://www.remotesensing.org/libtiff/

Packit 994f1a
Packit 994f1a
Packit 994f1a

Packit 994f1a
</body>
Packit 994f1a
</html>