JBIG2 - bugfixing

This commit is contained in:
Jakub Melka
2019-11-03 14:56:56 +01:00
parent ab10a6923e
commit 0b507c2610
4 changed files with 10 additions and 4 deletions

View File

@ -102,7 +102,7 @@ void MainWindow::on_actionAdd_JBIG2_image_triggered()
QImage image(imageData.getWidth(), imageData.getHeight(), QImage::Format_Mono);
const uchar* sourceData = reinterpret_cast<const uchar*>(imageData.getData().constData());
Q_ASSERT(imageData.getData().size() == image.byteCount());
std::transform(sourceData, sourceData + imageData.getData().size(), image.bits(), [](const uchar value) { return ~value; });
std::transform(sourceData, sourceData + imageData.getData().size(), image.bits(), [](const uchar value) { return value; });
addImage(file.fileName() + QString(", Decoded in %1 [msec]").arg(time), qMove(image));
}
}