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

TIFFReadRGBATile

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

TIFFReadRGBATile − read and decode an image tile

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
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
       cols="5" cellspacing="0" cellpadding="0">
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8
Packit Service 2594b8

#define TIFFGetR(abgr)

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

((abgr) & 0xff)

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

#define TIFFGetG(abgr)

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

(((abgr) >> 8) & 0xff)

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

#define TIFFGetB(abgr)

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

(((abgr) >> 16) & 0xff)

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

#define TIFFGetA(abgr)

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

(((abgr) >> 24) & 0xff)

Packit Service 2594b8
Packit Service 2594b8
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

int TIFFReadRGBATile(TIFF *tif,

Packit Service 2594b8
uint32 x, uint32 y, 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

TIFFReadRGBATile reads a single tile of a

Packit Service 2594b8
tile-based image into memory, storing the result in the user
Packit Service 2594b8
supplied RGBA raster. The raster is assumed to be an
Packit Service 2594b8
array of width times length 32-bit entries, where width is
Packit Service 2594b8
the width of a tile (TIFFTAG_TILEWIDTH) and length is the
Packit Service 2594b8
height of a tile (TIFFTAG_TILELENGTH).

Packit Service 2594b8
Packit Service 2594b8

The x and y values are the offsets from the

Packit Service 2594b8
top left corner to the top left corner of the tile to be
Packit Service 2594b8
read. They must be an exact multiple of the tile width and
Packit Service 2594b8
length.

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
tile. That is bottom to top organization. Edge tiles which
Packit Service 2594b8
partly fall off the image will be filled out with
Packit Service 2594b8
appropriate zeroed areas.

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

TIFFReadRGBATile is just a wrapper around the more

Packit Service 2594b8
general TIFFRGBAImage(3TIFF) facilities. It’s
Packit Service 2594b8
main advantage over the similar TIFFReadRGBAImage()
Packit Service 2594b8
function is that for large images a single buffer capable of
Packit Service 2594b8
holding the whole image doesn’t need to be allocated,
Packit Service 2594b8
only enough for one tile. The TIFFReadRGBAStrip()
Packit Service 2594b8
function does a similar operation for stripped 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
TIFFReadRGBAStrip(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>