mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
JXR: Fix loss of HDR data on write for format RGBA16FPx16_Premultiplied
When writing RGBA16FPx16_Premultiplied format, the image was converted to RGBA64 by clamping the float values. With this patch float values outside the range [0, 1] are preserved.
This commit is contained in:
parent
b649cca304
commit
1cb294545f
Binary file not shown.
@ -457,7 +457,7 @@ public:
|
||||
<< QImage::Format_Mono;
|
||||
// clang-format on
|
||||
|
||||
// To avoid complex code, I will save only inetger formats.
|
||||
// To avoid complex code, I will save only integer formats.
|
||||
auto qi = source;
|
||||
if (qi.format() == QImage::Format_MonoLSB) {
|
||||
qi = qi.convertToFormat(QImage::Format_Mono);
|
||||
@ -468,6 +468,11 @@ public:
|
||||
else
|
||||
qi = qi.convertToFormat(QImage::Format_RGBA8888);
|
||||
}
|
||||
#ifndef JXR_DENY_FLOAT_IMAGE
|
||||
if (qi.format() == QImage::Format_RGBA16FPx4_Premultiplied) {
|
||||
qi = qi.convertToFormat(QImage::Format_RGBA16FPx4);
|
||||
}
|
||||
#endif // JXR_DENY_FLOAT_IMAGE
|
||||
|
||||
// generic
|
||||
if (!valid.contains(qi.format())) {
|
||||
|
Loading…
Reference in New Issue
Block a user