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

TIFFReadRGBATile

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

TIFFReadRGBATile − read and decode an image tile

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

#define TIFFGetR(abgr)

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

((abgr) & 0xff)

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

#define TIFFGetG(abgr)

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

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

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

#define TIFFGetB(abgr)

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

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

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

#define TIFFGetA(abgr)

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

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

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

int TIFFReadRGBATile(TIFF *tif,

Packit 85355f
uint32 x, uint32 y, 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

TIFFReadRGBATile reads a single tile of a

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

Packit 85355f
Packit 85355f

The x and y values are the offsets from the

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

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

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

TIFFReadRGBATile is just a wrapper around the more

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