Use BABL method for 16-to-8 bit conversion (#3429)

This commit is contained in:
Flössie
2016-09-22 21:52:07 +02:00
parent 7635559062
commit 759676788b
6 changed files with 30 additions and 26 deletions

View File

@@ -74,7 +74,7 @@ void Image8::setScanline (int row, unsigned char* buffer, int bps, float *minVal
unsigned short* sbuffer = (unsigned short*) buffer;
for (int i = 0, ix = row * width * 3; i < width * 3; ++i, ++ix) {
data[ix] = (sbuffer[i] + 128) / 257;
data[ix] = uint16ToUint8Rounded(sbuffer[i]);
}
break;