From Patrick Neary, "To the tiff plugin, add the capability to write tiff images with unsigned short data"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14969 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
7a94ce8585
commit
67fb0b3530
@ -852,6 +852,9 @@ class ReaderWriterTIFF : public osgDB::ReaderWriter
|
||||
else if (compressTypeOpt == "jpeg") {
|
||||
compressionType = COMPRESSION_JPEG;
|
||||
}
|
||||
else if (compressTypeOpt == "none") {
|
||||
compressionType = COMPRESSION_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -883,10 +886,12 @@ class ReaderWriterTIFF : public osgDB::ReaderWriter
|
||||
case GL_DEPTH_COMPONENT:
|
||||
case GL_LUMINANCE:
|
||||
case GL_ALPHA:
|
||||
case GL_RED:
|
||||
photometric = PHOTOMETRIC_MINISBLACK;
|
||||
samplesPerPixel = 1;
|
||||
break;
|
||||
case GL_LUMINANCE_ALPHA:
|
||||
case GL_RG:
|
||||
photometric = PHOTOMETRIC_MINISBLACK;
|
||||
samplesPerPixel = 2;
|
||||
break;
|
||||
@ -913,6 +918,10 @@ class ReaderWriterTIFF : public osgDB::ReaderWriter
|
||||
TIFFSetField(image, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT);
|
||||
bitsPerSample = 16;
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT:
|
||||
TIFFSetField(image, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
|
||||
bitsPerSample = 16;
|
||||
break;
|
||||
default:
|
||||
bitsPerSample = 8;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user