.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TIFFREADRGBATILE" "3tiff" "Nov 26, 2023" "4.6" "LibTIFF" .SH NAME TIFFReadRGBATile \- read and decode an image tile into a fixed-format raster .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include .EE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int TIFFReadRGBATile(TIFF *tif, uint32_t x, uint32_t y, uint32_t *raster) .UNINDENT .INDENT 0.0 .TP .B int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, int stop_on_error) .UNINDENT .SH DESCRIPTION .sp \fI\%TIFFReadRGBATile()\fP reads a single tile of a tile\-based image into memory, storing the result in the user supplied RGBA \fIraster\fP\&. The raster is assumed to be an array of \fBTileWidth\fP × \fBTileLength\fP 32\-bit entries, where \fBTileWidth\fP is the width of a tile (\fBTIFFTAG_TILEWIDTH\fP) and \fBTileLength\fP is the height of a tile (\fBTIFFTAG_TILELENGTH\fP). .sp \fI\%TIFFReadRGBATileExt()\fP provides the parameter \fIstop_on_error\fP\&. Its behaviour is described at \fI\%TIFFReadRGBAImage\fP\&. .sp The \fIx\fP and \fIy\fP values are the offsets from the top left corner to the top left corner of the tile to be read. They must be an exact multiple of the tile width and length. .sp Note that the raster is assume to be organized such that the pixel at location (\fIx\fP, \fIy\fP) is \fIraster\fP [ \fIy\fP × \fIwidth\fP + \fIx\fP ]; with the raster origin in the \fIlower\-left hand corner\fP of the tile. That is bottom to top organization. Edge tiles which partly fall off the image will be filled out with appropriate zeroed areas. .sp Raster pixels are 8\-bit packed red, green, blue, alpha samples. The macros \fI\%TIFFGetR\fP, \fI\%TIFFGetG\fP, \fI\%TIFFGetB\fP, and \fI\%TIFFGetA\fP should be used to access individual samples. Images without Associated Alpha matting information have a constant Alpha of 1.0 (255). .sp See the \fI\%TIFFRGBAImage\fP page for more details on how various image types are converted to RGBA values. .SH NOTES .sp Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. \fBSamplesPerPixel\fP \- \fBExtraSamples\fP). .sp Palette image colormaps that appear to be incorrectly written as 8\-bit values are automatically scaled to 16\-bits. .sp \fI\%TIFFReadRGBATile()\fP is just a wrapper around the more general \fI\%TIFFRGBAImage\fP facilities. It\(aqs main advantage over the similar \fI\%TIFFReadRGBAImage()\fP function is that for large images a single buffer capable of holding the whole image doesn\(aqt need to be allocated, only enough for one tile. The \fI\%TIFFReadRGBAStrip()\fP function does a similar operation for stripped images. .SH RETURN VALUES .sp 1 is returned if the image was successfully read and converted. Otherwise, 0 is returned if an error was encountered. .SH DIAGNOSTICS .sp All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. .sp \fB\(dqSorry, can not handle %d\-bit pictures\(dq\fP: .INDENT 0.0 .INDENT 3.5 The image had \fBBitsPerSample\fP other than 1, 2, 4, 8, or 16. .UNINDENT .UNINDENT .sp \fB\(dqSorry, can not handle %d\-channel images\(dq\fP: .INDENT 0.0 .INDENT 3.5 The image had \fBSamplesPerPixel\fP other than 1, 3, or 4. .UNINDENT .UNINDENT .sp \fBMissing needed \(dqPhotometricInterpretation\(dq tag\fP: .INDENT 0.0 .INDENT 3.5 The image did not have a tag that describes how to display the data. .UNINDENT .UNINDENT .sp \fBNo \(dqPhotometricInterpretation\(dq tag, assuming RGB\fP: .INDENT 0.0 .INDENT 3.5 The image was missing a tag that describes how to display it, but because it has 3 or 4 samples/pixel, it is assumed to be RGB. .UNINDENT .UNINDENT .sp \fBNo \(dqPhotometricInterpretation\(dq tag, assuming min\-is\-black\fP: .INDENT 0.0 .INDENT 3.5 The image was missing a tag that describes how to display it, but because it has 1 sample/pixel, it is assumed to be a grayscale or bilevel image. .UNINDENT .UNINDENT .sp \fB\(dqNo space for photometric conversion table\(dq\fP: .INDENT 0.0 .INDENT 3.5 There was insufficient memory for a table used to convert image samples to 8\-bit RGB. .UNINDENT .UNINDENT .sp \fBMissing required \(dqColormap\(dq tag\fP: .INDENT 0.0 .INDENT 3.5 A Palette image did not have a required \fBColormap\fP tag. .UNINDENT .UNINDENT .sp \fB\(dqNo space for tile buffer\(dq\fP: .INDENT 0.0 .INDENT 3.5 There was insufficient memory to allocate an i/o buffer. .UNINDENT .UNINDENT .sp \fB\(dqNo space for strip buffer\(dq\fP: .INDENT 0.0 .INDENT 3.5 There was insufficient memory to allocate an i/o buffer. .UNINDENT .UNINDENT .sp \fB\(dqCan not handle format\(dq\fP: .INDENT 0.0 .INDENT 3.5 The image has a format (combination of \fBBitsPerSample\fP, \fBSamplesPerPixel\fP, and \fBPhotometricInterpretation\fP) that \fI\%TIFFReadRGBAImage()\fP can not handle. .UNINDENT .UNINDENT .sp \fB\(dqNo space for B&W mapping table\(dq\fP: .INDENT 0.0 .INDENT 3.5 There was insufficient memory to allocate a table used to map grayscale data to RGB. .UNINDENT .UNINDENT .sp \fB\(dqNo space for Palette mapping table\(dq\fP: .INDENT 0.0 .INDENT 3.5 There was insufficient memory to allocate a table used to map data to 8\-bit RGB. .UNINDENT .UNINDENT .SH SEE ALSO .sp \fI\%TIFFOpen\fP (3tiff), \fI\%TIFFRGBAImage\fP (3tiff), \fI\%TIFFReadRGBAImage\fP (3tiff), \fI\%TIFFReadRGBAStrip\fP (3tiff), \fI\%libtiff\fP (3tiff) .SH AUTHOR LibTIFF contributors .SH COPYRIGHT 1988-2023, LibTIFF contributors .\" Generated by docutils manpage writer. .