Commit 5850a9b8 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3744 from es0m:remotes/upstream/2.4.10.x-prep

parents 22ad72d0 998a9097
......@@ -574,13 +574,18 @@ bool TiffEncoder::writeLibTiff( const Mat& img, const std::vector<int>& params)
|| !TIFFSetField(pTiffHandle, TIFFTAG_SAMPLESPERPIXEL, channels)
|| !TIFFSetField(pTiffHandle, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)
|| !TIFFSetField(pTiffHandle, TIFFTAG_ROWSPERSTRIP, rowsPerStrip)
|| !TIFFSetField(pTiffHandle, TIFFTAG_PREDICTOR, predictor)
)
{
TIFFClose(pTiffHandle);
return false;
}
if (compression != COMPRESSION_NONE && !TIFFSetField(pTiffHandle, TIFFTAG_PREDICTOR, predictor) )
{
TIFFClose(pTiffHandle);
return false;
}
// row buffer, because TIFFWriteScanline modifies the original data!
size_t scanlineSize = TIFFScanlineSize(pTiffHandle);
AutoBuffer<uchar> _buffer(scanlineSize+32);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment