Blame html/man/TIFFReadRGBAStrip.3tiff.html

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

TIFFReadRGBAStrip

Packit 85355f
NAME
Packit 85355f
SYNOPSIS
Packit 85355f
DESCRIPTION
Packit 85355f
NOTES
Packit 85355f
RETURN VALUES
Packit 85355f
DIAGNOSTICS
Packit 85355f
SEE ALSO
Packit 85355f
Packit 85355f

Packit 85355f
Packit 85355f

NAME

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

TIFFReadRGBAStrip − read and decode an image strip

Packit 85355f
into a fixed-format raster

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

SYNOPSIS

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

#include <tiffio.h>

Packit 85355f
Packit 85355f

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

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

Packit 85355f
Packit 85355f

int TIFFReadRGBAStrip(TIFF *tif,

Packit 85355f
uint32 row, uint32
Packit 85355f
*raster)

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

DESCRIPTION

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

TIFFReadRGBAStrip reads a single strip of a

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

Packit 85355f
Packit 85355f

The row value should be the row of the first row

Packit 85355f
in the strip (strip * rowsperstrip, zero based).

Packit 85355f
Packit 85355f

Note that the raster is assume to be organized such that

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

Packit 85355f
Packit 85355f

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

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

Packit 85355f
Packit 85355f

See the TIFFRGBAImage(3TIFF) page for more details

Packit 85355f
on how various image types are converted to RGBA values.

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

NOTES

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

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

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

Packit 85355f
Packit 85355f

Palette image colormaps that appear to be incorrectly

Packit 85355f
written as 8-bit values are automatically scaled to
Packit 85355f
16-bits.

Packit 85355f
Packit 85355f

TIFFReadRGBAStrip is just a wrapper around the

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

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

RETURN VALUES

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

1 is returned if the image was successfully read and

Packit 85355f
converted. Otherwise, 0 is returned if an error was
Packit 85355f
encountered.

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

DIAGNOSTICS

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

All error messages are directed to the

Packit 85355f
TIFFError(3TIFF) routine.

Packit 85355f
Packit 85355f

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

Packit 85355f
had BitsPerSample other than 1, 2, 4, 8, or 16.

Packit 85355f
Packit 85355f

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

Packit 85355f
had SamplesPerPixel other than 1, 3, or 4.

Packit 85355f
Packit 85355f

Missing needed "PhotometricInterpretation"

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

Packit 85355f
Packit 85355f

No "PhotometricInterpretation" tag, assuming

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

Packit 85355f
Packit 85355f

No "PhotometricInterpretation" tag, assuming

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

Packit 85355f
Packit 85355f

No space for photometric conversion table. There

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

Packit 85355f
Packit 85355f

Missing required "Colormap" tag. A

Packit 85355f
Palette image did not have a required Colormap
Packit 85355f
tag.

Packit 85355f
Packit 85355f

No space for tile buffer. There was insufficient

Packit 85355f
memory to allocate an i/o buffer.

Packit 85355f
Packit 85355f

No space for strip buffer. There was insufficient

Packit 85355f
memory to allocate an i/o buffer.

Packit 85355f
Packit 85355f

Can not handle format. The image has a format

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

Packit 85355f
Packit 85355f

No space for B&W mapping table. There was

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

Packit 85355f
Packit 85355f

No space for Palette mapping table. There was

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

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

SEE ALSO

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

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

Packit 85355f
TIFFReadRGBAImage(3TIFF),
Packit 85355f
TIFFReadRGBATile(3TIFF), libtiff(3TIFF)

Packit 85355f
Packit 85355f

Libtiff library home page:

Packit 85355f
http://www.simplesystems.org/libtiff/

Packit 85355f
Packit 85355f
Packit 85355f

Packit 85355f
</body>
Packit 85355f
</html>