Fix #4532, Fix #4533 : Pentax HDR/PEF and 16/24 bits float support

This commit is contained in:
Hombre
2018-05-06 17:14:44 +02:00
parent a6f82d0212
commit ec2181f7ff
10 changed files with 103 additions and 40 deletions

View File

@@ -51,8 +51,13 @@ void Imagefloat::setScanline (int row, unsigned char* buffer, int bps, unsigned
return;
}
// The DNG decoder convert to 32 bits float data even if the file contains 16 or 24 bits data.
// DNG_HalfToFloat and DNG_FP24ToFloat from dcraw.cc can be used to manually convert
// from 16 and 24 bits to 32 bits float respectively
switch (sampleFormat) {
case (IIOSF_FLOAT): {
case (IIOSF_FLOAT16):
case (IIOSF_FLOAT24):
case (IIOSF_FLOAT32): {
int ix = 0;
float* sbuffer = (float*) buffer;