Blame html/man/TIFFReadRGBATile.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>TIFFReadRGBATile</title>
Packit 7838c8
</head>
Packit 7838c8
<body>
Packit 7838c8
Packit 7838c8

TIFFReadRGBATile

Packit 7838c8
NAME
Packit 7838c8
SYNOPSIS
Packit 7838c8
DESCRIPTION
Packit 7838c8
NOTES
Packit 7838c8
RETURN VALUES
Packit 7838c8
DIAGNOSTICS
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

TIFFReadRGBATile − read and decode an image tile

Packit 7838c8
into a fixed-format raster

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
Packit 7838c8
Packit 7838c8
Packit 7838c8
       cols="5" cellspacing="0" cellpadding="0">
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8
Packit 7838c8

#define TIFFGetR(abgr)

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

((abgr) & 0xff)

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

#define TIFFGetG(abgr)

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

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

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

#define TIFFGetB(abgr)

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

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

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

#define TIFFGetA(abgr)

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

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

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

int TIFFReadRGBATile(TIFF *tif,

Packit 7838c8
uint32 x, uint32 y, uint32
Packit 7838c8
*raster)

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

TIFFReadRGBATile reads a single tile of a

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

Packit 7838c8
Packit 7838c8

The x and y values are the offsets from the

Packit 7838c8
top left corner to the top left corner of the tile to be
Packit 7838c8
read. They must be an exact multiple of the tile width and
Packit 7838c8
length.

Packit 7838c8
Packit 7838c8

Note that the raster is assume to be organized such that

Packit 7838c8
the pixel at location (x,y) is
Packit 7838c8
raster[y*width+x]; with the
Packit 7838c8
raster origin in the lower-left hand corner of the
Packit 7838c8
tile. That is bottom to top organization. Edge tiles which
Packit 7838c8
partly fall off the image will be filled out with
Packit 7838c8
appropriate zeroed areas.

Packit 7838c8
Packit 7838c8

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

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

Packit 7838c8
Packit 7838c8

See the TIFFRGBAImage(3TIFF) page for more details

Packit 7838c8
on how various image types are converted to RGBA values.

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

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

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

Packit 7838c8
Packit 7838c8

Palette image colormaps that appear to be incorrectly

Packit 7838c8
written as 8-bit values are automatically scaled to
Packit 7838c8
16-bits.

Packit 7838c8
Packit 7838c8

TIFFReadRGBATile is just a wrapper around the more

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

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

1 is returned if the image was successfully read and

Packit 7838c8
converted. Otherwise, 0 is returned if an error was
Packit 7838c8
encountered.

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

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

Packit 7838c8
had BitsPerSample other than 1, 2, 4, 8, or 16.

Packit 7838c8
Packit 7838c8

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

Packit 7838c8
had SamplesPerPixel other than 1, 3, or 4.

Packit 7838c8
Packit 7838c8

Missing needed "PhotometricInterpretation"

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

Packit 7838c8
Packit 7838c8

No "PhotometricInterpretation" tag, assuming

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

Packit 7838c8
Packit 7838c8

No "PhotometricInterpretation" tag, assuming

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

Packit 7838c8
Packit 7838c8

No space for photometric conversion table. There

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

Packit 7838c8
Packit 7838c8

Missing required "Colormap" tag. A

Packit 7838c8
Palette image did not have a required Colormap
Packit 7838c8
tag.

Packit 7838c8
Packit 7838c8

No space for tile buffer. There was insufficient

Packit 7838c8
memory to allocate an i/o buffer.

Packit 7838c8
Packit 7838c8

No space for strip buffer. There was insufficient

Packit 7838c8
memory to allocate an i/o buffer.

Packit 7838c8
Packit 7838c8

Can not handle format. The image has a format

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

Packit 7838c8
Packit 7838c8

No space for B&W mapping table. There was

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

Packit 7838c8
Packit 7838c8

No space for Palette mapping table. There was

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

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

Packit 7838c8
TIFFReadRGBAImage(3TIFF),
Packit 7838c8
TIFFReadRGBAStrip(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>