Changeset 8566
- Timestamp:
- 07/11/08 21:43:01
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph/trunk/src/osgPlugins/tiff/ReaderWriterTIFF.cpp
r7878 r8566 690 690 TIFF *image; 691 691 int samplesPerPixel; 692 int bitsPerSample; 692 693 uint16 photometric; 693 694 … … 729 730 } 730 731 732 switch(img.getDataType()){ 733 case GL_FLOAT: 734 TIFFSetField(image, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP); 735 TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, 1); 736 bitsPerSample = 32; 737 break; 738 default: 739 bitsPerSample = 8; 740 break; 741 } 742 731 743 TIFFSetField(image, TIFFTAG_IMAGEWIDTH,img.s()); 732 744 TIFFSetField(image, TIFFTAG_IMAGELENGTH,img.t()); 733 TIFFSetField(image, TIFFTAG_BITSPERSAMPLE, 8);745 TIFFSetField(image, TIFFTAG_BITSPERSAMPLE,bitsPerSample); 734 746 TIFFSetField(image, TIFFTAG_SAMPLESPERPIXEL,samplesPerPixel); 735 747 TIFFSetField(image, TIFFTAG_PHOTOMETRIC, photometric);
