RT now generates valid 16-bit float TIFF output image (see #2357)

...however the "reader" of those files is broken and make RT crash.

Thanks to @heckflosse for the "writer" patch.
This commit is contained in:
Hombre
2018-05-10 22:13:06 +02:00
parent 3044cd80c9
commit b356c74813
8 changed files with 166 additions and 96 deletions

View File

@@ -37,7 +37,7 @@ Image8::~Image8 ()
{
}
void Image8::getScanline (int row, unsigned char* buffer, int bps)
void Image8::getScanline (int row, unsigned char* buffer, int bps, bool isFloat)
{
if (data == nullptr) {
@@ -55,16 +55,13 @@ void Image8::getScanline (int row, unsigned char* buffer, int bps)
}
}
void Image8::setScanline (int row, unsigned char* buffer, int bps, unsigned int numSamples, float *minValue, float *maxValue)
void Image8::setScanline (int row, unsigned char* buffer, int bps, unsigned int numSamples)
{
if (data == nullptr) {
return;
}
// For optimization purpose, we're assuming that this class never have to provide min/max bound
assert(!minValue);
switch (sampleFormat) {
case (IIOSF_UNSIGNED_CHAR):
if(numSamples == 1) {