Add support for embedded single channel previews, fixes #4419

This commit is contained in:
heckflosse
2018-03-20 22:20:25 +01:00
parent b29029527d
commit 59ebf99f63
8 changed files with 26 additions and 15 deletions

View File

@@ -523,7 +523,7 @@ int ImageIO::loadJPEGFromMemory (const char* buffer, int bufsize)
return IMIO_READERROR;
}
setScanline (cinfo.output_scanline - 1, row, 8);
setScanline (cinfo.output_scanline - 1, row, 8, cinfo.num_components);
if (pl && !(cinfo.output_scanline % 100)) {
pl->setProgress ((double)(cinfo.output_scanline) / cinfo.output_height);
@@ -860,7 +860,7 @@ int ImageIO::loadTIFF (Glib::ustring fname)
}
}
setScanline (row, linebuffer, bitspersample, nullptr, nullptr);
setScanline (row, linebuffer, bitspersample);
if (pl && !(row % 100)) {
pl->setProgress ((double)(row + 1) / height);