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

@@ -1468,9 +1468,9 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, float isFloat, bool uncompr
}
for (int row = 0; row < height; row++) {
getScanline (row, linebuffer, bps);
getScanline (row, linebuffer, bps, isFloat);
/*if (bps == 16) {
if (bps == 16) {
if(needsReverse && !uncompressed) {
for(int i = 0; i < lineWidth; i += 2) {
char temp = linebuffer[i];
@@ -1478,7 +1478,7 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, float isFloat, bool uncompr
linebuffer[i + 1] = temp;
}
}
} else */ if (bps == 32) {
} else if (bps == 32) {
if(needsReverse && !uncompressed) {
for(int i = 0; i < lineWidth; i += 4) {
char temp = linebuffer[i];