Reinstated the TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, rowsperstrip);

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14985 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2015-07-19 09:51:01 +00:00
parent 6c83b2e3a9
commit 0d120d208b

View File

@ -908,10 +908,12 @@ class ReaderWriterTIFF : public osgDB::ReaderWriter
break;
}
uint32 rowsperstrip = 0;
switch(img.getDataType()){
case GL_FLOAT:
TIFFSetField(image, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP);
TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, 1);
rowsperstrip = 1;
bitsPerSample = 32;
break;
case GL_SHORT:
@ -935,9 +937,9 @@ class ReaderWriterTIFF : public osgDB::ReaderWriter
TIFFSetField(image, TIFFTAG_COMPRESSION, compressionType);
TIFFSetField(image, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
TIFFSetField(image, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
//uint32 rowsperstrip = TIFFDefaultStripSize(image, -1);
//TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
if (rowsperstrip==0) rowsperstrip = TIFFDefaultStripSize(image, 0);
TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
// Write the information to the file
for(int i = 0; i < img.t(); ++i) {