Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 1e91e0bf authored by Dmitry Kazakov's avatar Dmitry Kazakov

Force PNG files to be converted into Rec 2020 PQ when HDR option is active

parent bb2a9433
......@@ -917,7 +917,8 @@ KisImageBuilder_Result KisPNGConverter::buildFile(QIODevice* iodevice, const QRe
if (device->colorSpace()->colorDepthId() == Float16BitsColorDepthID
|| device->colorSpace()->colorDepthId() == Float32BitsColorDepthID
|| device->colorSpace()->colorDepthId() == Float64BitsColorDepthID) {
|| device->colorSpace()->colorDepthId() == Float64BitsColorDepthID
|| options.saveAsHDR) {
const KoColorSpace *dstCS =
KoColorSpaceRegistry::instance()->colorSpace(
......@@ -939,16 +940,8 @@ KisImageBuilder_Result KisPNGConverter::buildFile(QIODevice* iodevice, const QRe
device = tmp;
} else {
KIS_SAFE_ASSERT_RECOVER(!options.saveAsHDR ||
(device->colorSpace()->profile() &&
device->colorSpace()->profile()->uniqueId() ==
KoColorSpaceRegistry::instance()->p2020PQProfile()->uniqueId())) {
options.saveAsHDR = false;
}
}
KIS_SAFE_ASSERT_RECOVER(!options.saveAsHDR || !options.forceSRGB) {
options.forceSRGB = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment