.\" 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 "TIFFWRITEENCODEDSTRIP" "3tiff" "Nov 26, 2023" "4.6" "LibTIFF" .SH NAME TIFFWriteEncodedStrip \- compress and write a strip of data to an open TIFF file .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include .EE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B tsize_t TIFFWriteEncodedStrip(TIFF *tif, tstrip_t strip, tdata_t buf, tsize_t size) .UNINDENT .SH DESCRIPTION .sp Compress \fIsize\fP bytes of raw data from \fIbuf\fP and write the result to the specified strip; replacing any previously written data. Note that the value of \fIstrip\fP is a \(dqraw strip number\(dq. That is, the caller must take into account whether or not the data are organized in separate planes (\fBPlanarConfiguration\fP = 2). .SH NOTES .sp The library writes encoded data using the native machine byte order. Correctly implemented TIFF readers are expected to do any necessary byte\-swapping to correctly process image data with \fBBitsPerSample\fP greater than 8. .sp The strip number must be valid according to the current settings of the \fBImageLength\fP and \fBRowsPerStrip\fP tags. An image may be dynamically grown by increasing the value of \fBImageLength\fP prior to each call to \fBTIFFWriteEncodedStrip\fP\&. .SH RETURN VALUES .sp \-1 is returned if an error was encountered. Otherwise, the value of \fIsize\fP is returned. .SH DIAGNOSTICS .sp All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. .sp \fB%s: File not open for writing\fP: .INDENT 0.0 .INDENT 3.5 The file was opened for reading, not writing. .UNINDENT .UNINDENT .sp \fBCan not write scanlines to a tiled image\fP: .INDENT 0.0 .INDENT 3.5 The image is assumed to be organized in tiles because the \fBTileWidth\fP and \fBTileLength\fP tags have been set with \fI\%TIFFSetField()\fP\&. .UNINDENT .UNINDENT .sp \fB%s: Must set \(dqImageWidth\(dq before writing data\efP\fP: .INDENT 0.0 .INDENT 3.5 The image\(aqs width has not be set before the first write. See \fI\%TIFFSetField()\fP for information on how to do this. .UNINDENT .UNINDENT .sp \fB%s: Must set \(dqPlanarConfiguration\(dq before writing data\fP: .INDENT 0.0 .INDENT 3.5 The organization of data has not be defined before the first write. See \fI\%TIFFSetField()\fP for information on how to do this. .UNINDENT .UNINDENT .sp \fB%s: No space for strip arrays\(dq\fP: .INDENT 0.0 .INDENT 3.5 There was not enough space for the arrays that hold strip offsets and byte counts. .UNINDENT .UNINDENT .SH SEE ALSO .sp \fI\%TIFFOpen\fP (3tiff), \fI\%TIFFWriteScanline\fP (3tiff), \fI\%TIFFWriteRawStrip\fP (3tiff), \fI\%libtiff\fP (3tiff) .SH AUTHOR LibTIFF contributors .SH COPYRIGHT 1988-2023, LibTIFF contributors .\" Generated by docutils manpage writer. .