.\" 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 "TIFFREADRGBASTRIP" "3tiff" "Nov 26, 2023" "4.6" "LibTIFF" .SH NAME TIFFReadRGBAStrip \- read and decode an image strip 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 TIFFReadRGBAStrip(TIFF *tif, uint32_t row, uint32_t *raster) .UNINDENT .INDENT 0.0 .TP .B int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster, int stop_on_error) .UNINDENT .SH DESCRIPTION .sp \fI\%TIFFReadRGBAStrip()\fP reads a single strip of a strip\-based image into memory, storing the result in the user supplied RGBA \fIraster\fP\&. The raster is assumed to be an array of \fBImageWidth\fP × \fBRowsPerStrip\fP 32\-bit entries, where \fBImageWidth\fP is the width of the image (\fBTIFFTAG_IMAGEWIDTH\fP) and \fBRowsPerStrip\fP is the maximum lines in a strip (\fBTIFFTAG_ROWSPERSTRIP\fP). .sp \fI\%TIFFReadRGBAStripExt()\fP provides the paramater \fIstop_on_error\fP\&. Its behaviour is described at \fI\%TIFFReadRGBAImage\fP\&. .sp The \fIrow\fP value should be the row of the first row in the strip (\fIstrip\fP × \fBRowsPerStrip\fP, zero based). .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 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. .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\%TIFFReadRGBAStrip()\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 strip. The \fI\%TIFFReadRGBATile()\fP function does a similar operation for tiled 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\efP\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\%TIFFReadRGBATile\fP (3tiff), \fI\%libtiff\fP (3tiff) .SH AUTHOR LibTIFF contributors .SH COPYRIGHT 1988-2023, LibTIFF contributors .\" Generated by docutils manpage writer. .