table of contents
- bookworm 4.5.0-6+deb12u1
- testing 4.5.1+git230720-5
- unstable 4.5.1+git230720-5
- experimental 4.6.0-2
TIFFREADRGBASTRIP(3tiff) | LibTIFF | TIFFREADRGBASTRIP(3tiff) |
NAME¶
TIFFReadRGBAStrip - read and decode an image strip into a fixed-format raster
SYNOPSIS¶
#include <tiffio.h>
DESCRIPTION¶
TIFFReadRGBAStrip() reads a single strip of a strip-based image into memory, storing the result in the user supplied RGBA raster. The raster is assumed to be an array of ImageWidth × RowsPerStrip 32-bit entries, where ImageWidth is the width of the image (TIFFTAG_IMAGEWIDTH) and RowsPerStrip is the maximum lines in a strip (TIFFTAG_ROWSPERSTRIP).
TIFFReadRGBAStripExt() provides the paramater stop_on_error. Its behaviour is described at TIFFReadRGBAImage.
The row value should be the row of the first row in the strip (strip × RowsPerStrip, zero based).
Note that the raster is assume to be organized such that the pixel at location (x, y) is raster [ y × width + x ]; with the raster origin in the lower-left hand corner of the strip. That is bottom to top organization. When reading a partial last strip in the file the last line of the image will begin at the beginning of the buffer.
Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros TIFFGetR, TIFFGetG, TIFFGetB, and TIFFGetA should be used to access individual samples. Images without Associated Alpha matting information have a constant Alpha of 1.0 (255).
See the TIFFRGBAImage page for more details on how various image types are converted to RGBA values.
NOTES¶
Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. SamplesPerPixel - ExtraSamples).
Palette image colormaps that appear to be incorrectly written as 8-bit values are automatically scaled to 16-bits.
TIFFReadRGBAStrip() is just a wrapper around the more general TIFFRGBAImage facilities. It's main advantage over the similar TIFFReadRGBAImage() function is that for large images a single buffer capable of holding the whole image doesn't need to be allocated, only enough for one strip. The TIFFReadRGBATile() function does a similar operation for tiled images.
RETURN VALUES¶
1 is returned if the image was successfully read and converted. Otherwise, 0 is returned if an error was encountered.
DIAGNOSTICS¶
All error messages are directed to the TIFFErrorExtR() routine.
"Sorry, can not handle %d-bit pictures":
"Sorry, can not handle %d-channel images":
Missing needed "PhotometricInterpretation" tag:
No "PhotometricInterpretation" tag, assuming RGB:
No "PhotometricInterpretation" tag, assuming min-is-black\fP:
"No space for photometric conversion table":
Missing required "Colormap" tag:
"No space for tile buffer":
"No space for strip buffer":
"Can not handle format":
"No space for B&W mapping table":
"No space for Palette mapping table":
SEE ALSO¶
TIFFOpen (3tiff), TIFFRGBAImage (3tiff), TIFFReadRGBAImage (3tiff), TIFFReadRGBATile (3tiff), libtiff (3tiff)
AUTHOR¶
LibTIFF contributors
COPYRIGHT¶
1988-2023, LibTIFF contributors
November 23, 2023 | 4.5 |