Hi Robert the attached file didn't work we made some changes and we are verifying them before sending them along. Thanks --Patrick On Jul 17, 2015 9:56 AM, "Robert Osfield" <[email protected]> wrote:
> Hi Patrick, > > On 17 July 2015 at 12:57, Patrick Neary <[email protected]> wrote: > >> Hi Robert sorry for the delay in reply. I was consulting with the >> engineer that made that change and we do need those lines uncommented. The >> reason is that our analysis tools could not read the unsigned tiff data >> without the tag present. If you notice in the switch statement for >> img.getDataType around line 910, the rowsperstrip tag is being set for >> float data but not for signed or unsigned short. upon further inspection, >> it seems that the two lines should be just before the switch statement so >> that the tag is set for all data types. >> > > Thanks for the explanation. From your description the correct approach > would likely be: > > > $ svn diff > Index: ReaderWriterTIFF.cpp > =================================================================== > --- ReaderWriterTIFF.cpp (revision 14975) > +++ ReaderWriterTIFF.cpp (working copy) > @@ -908,10 +908,12 @@ > break; > } > > + uint32 rowsperstrip = TIFFDefaultStripSize(image, -1); > + > 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,10 +937,8 @@ > TIFFSetField(image, TIFFTAG_COMPRESSION, compressionType); > TIFFSetField(image, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB); > TIFFSetField(image, TIFFTAG_PLANARCONFIG, > PLANARCONFIG_CONTIG); > + TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, rowsperstrip); > > - //uint32 rowsperstrip = TIFFDefaultStripSize(image, -1); > - //TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, rowsperstrip); > - > // Write the information to the file > for(int i = 0; i < img.t(); ++i) { > > TIFFWriteScanline(image,(tdata_t)img.data(0,img.t()-i-1),i,0); > > > I have attached the modified ReaderWriterTIFF.cpp. Could you test this > out. > > Robert. > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
