mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
Set linear color space for proper viewing
This commit is contained in:
parent
491b223c15
commit
4dc2099fa4
@ -13,6 +13,7 @@
|
||||
#include <QImage>
|
||||
#include <QLoggingCategory>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QColorSpace>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@ -242,6 +243,9 @@ bool HDRHandler::read(QImage *outImage)
|
||||
// qDebug() << "Error loading HDR file.";
|
||||
return false;
|
||||
}
|
||||
// The images read by Gimp and Photoshop (including those of the tests) are interpreted with linear color space.
|
||||
// By setting the linear color space, programs that support profiles display HDR files as in GIMP and Photoshop.
|
||||
img.setColorSpace(QColorSpace(QColorSpace::SRgbLinear));
|
||||
|
||||
*outImage = img;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user