|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
<meta content="groff -Thtml, see www.gnu.org" name="generator">
|
|
kusano |
7d535a |
<meta content="text/css" name="Content-Style">
|
|
kusano |
7d535a |
<title>TIFFReadRGBAStrip</title>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFReadRGBAStrip
|
|
kusano |
7d535a |
NAME
|
|
kusano |
7d535a |
SYNOPSIS
|
|
kusano |
7d535a |
DESCRIPTION
|
|
kusano |
7d535a |
NOTES
|
|
kusano |
7d535a |
RETURN VALUES
|
|
kusano |
7d535a |
DIAGNOSTICS
|
|
kusano |
7d535a |
SEE ALSO
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
NAME
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFReadRGBAStrip − read and decode an image strip
|
|
kusano |
7d535a |
into a fixed-format raster
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SYNOPSIS
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#include <tiffio.h>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#define TIFFGetR(abgr) ((abgr) & 0xff)
|
|
kusano |
7d535a |
#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)
|
|
kusano |
7d535a |
#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)
|
|
kusano |
7d535a |
#define TIFFGetA(abgr) (((abgr) >> 24) &
|
|
kusano |
7d535a |
0xff)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int TIFFReadRGBAStrip(TIFF *tif,
|
|
kusano |
7d535a |
uint32 row, uint32
|
|
kusano |
7d535a |
*raster)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
DESCRIPTION
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFReadRGBAStrip reads a single strip of a
|
|
kusano |
7d535a |
strip-based image into memory, storing the result in the
|
|
kusano |
7d535a |
user supplied RGBA raster. The raster is assumed to
|
|
kusano |
7d535a |
be an array of width times rowsperstrip 32-bit entries,
|
|
kusano |
7d535a |
where width is the width of the image (TIFFTAG_IMAGEWIDTH)
|
|
kusano |
7d535a |
and rowsperstrip is the maximum lines in a strip
|
|
kusano |
7d535a |
(TIFFTAG_ROWSPERSTRIP).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The row value should be the row of the first row
|
|
kusano |
7d535a |
in the strip (strip * rowsperstrip, zero based).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Note that the raster is assume to be organized such that
|
|
kusano |
7d535a |
the pixel at location (x,y) is
|
|
kusano |
7d535a |
raster[y*width+x]; with the
|
|
kusano |
7d535a |
raster origin in the lower-left hand corner of the
|
|
kusano |
7d535a |
strip. That is bottom to top organization. When reading a
|
|
kusano |
7d535a |
partial last strip in the file the last line of the image
|
|
kusano |
7d535a |
will begin at the beginning of the buffer.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Raster pixels are 8-bit packed red, green, blue, alpha
|
|
kusano |
7d535a |
samples. The macros TIFFGetR, TIFFGetG,
|
|
kusano |
7d535a |
TIFFGetB, and TIFFGetA should be used to
|
|
kusano |
7d535a |
access individual samples. Images without Associated Alpha
|
|
kusano |
7d535a |
matting information have a constant Alpha of 1.0 (255).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
See the TIFFRGBAImage(3TIFF) page for more details
|
|
kusano |
7d535a |
on how various image types are converted to RGBA values.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
NOTES
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Samples must be either 1, 2, 4, 8, or 16 bits.
|
|
kusano |
7d535a |
Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
|
|
kusano |
7d535a |
SamplesPerPixel minus ExtraSamples).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Palette image colormaps that appear to be incorrectly
|
|
kusano |
7d535a |
written as 8-bit values are automatically scaled to
|
|
kusano |
7d535a |
16-bits.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFReadRGBAStrip is just a wrapper around the
|
|
kusano |
7d535a |
more general TIFFRGBAImage(3TIFF) facilities.
|
|
kusano |
7d535a |
It’s main advantage over the similar
|
|
kusano |
7d535a |
TIFFReadRGBAImage() function is that for large images
|
|
kusano |
7d535a |
a single buffer capable of holding the whole image
|
|
kusano |
7d535a |
doesn’t need to be allocated, only enough for one
|
|
kusano |
7d535a |
strip. The TIFFReadRGBATile() function does a similar
|
|
kusano |
7d535a |
operation for tiled images.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
RETURN VALUES
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
1 is returned if the image was successfully read and
|
|
kusano |
7d535a |
converted. Otherwise, 0 is returned if an error was
|
|
kusano |
7d535a |
encountered.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
DIAGNOSTICS
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
All error messages are directed to the
|
|
kusano |
7d535a |
TIFFError(3TIFF) routine.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Sorry, can not handle %d-bit pictures. The image
|
|
kusano |
7d535a |
had BitsPerSample other than 1, 2, 4, 8, or 16.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Sorry, can not handle %d-channel images. The image
|
|
kusano |
7d535a |
had SamplesPerPixel other than 1, 3, or 4.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Missing needed "PhotometricInterpretation"
|
|
kusano |
7d535a |
tag. The image did not have a tag that describes how to
|
|
kusano |
7d535a |
display the data.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
No "PhotometricInterpretation" tag, assuming
|
|
kusano |
7d535a |
RGB. The image was missing a tag that describes how to
|
|
kusano |
7d535a |
display it, but because it has 3 or 4 samples/pixel, it is
|
|
kusano |
7d535a |
assumed to be <small>RGB.</small>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
No "PhotometricInterpretation" tag, assuming
|
|
kusano |
7d535a |
min-is-black. The image was missing a tag that describes
|
|
kusano |
7d535a |
how to display it, but because it has 1 sample/pixel, it is
|
|
kusano |
7d535a |
assumed to be a grayscale or bilevel image.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
No space for photometric conversion table. There
|
|
kusano |
7d535a |
was insufficient memory for a table used to convert image
|
|
kusano |
7d535a |
samples to 8-bit <small>RGB.</small>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Missing required "Colormap" tag. A
|
|
kusano |
7d535a |
Palette image did not have a required Colormap
|
|
kusano |
7d535a |
tag.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
No space for tile buffer. There was insufficient
|
|
kusano |
7d535a |
memory to allocate an i/o buffer.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
No space for strip buffer. There was insufficient
|
|
kusano |
7d535a |
memory to allocate an i/o buffer.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Can not handle format. The image has a format
|
|
kusano |
7d535a |
(combination of BitsPerSample,
|
|
kusano |
7d535a |
SamplesPerPixel, and
|
|
kusano |
7d535a |
PhotometricInterpretation) that
|
|
kusano |
7d535a |
TIFFReadRGBAImage can not handle.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
No space for B&W mapping table. There was
|
|
kusano |
7d535a |
insufficient memory to allocate a table used to map
|
|
kusano |
7d535a |
grayscale data to <small>RGB.</small>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
No space for Palette mapping table. There was
|
|
kusano |
7d535a |
insufficient memory to allocate a table used to map data to
|
|
kusano |
7d535a |
8-bit <small>RGB.</small>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SEE ALSO
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFOpen(3TIFF), TIFFRGBAImage(3TIFF),
|
|
kusano |
7d535a |
TIFFReadRGBAImage(3TIFF),
|
|
kusano |
7d535a |
TIFFReadRGBATile(3TIFF), libtiff(3TIFF)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Libtiff library home page:
|
|
kusano |
7d535a |
http://www.remotesensing.org/libtiff/
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|