diff --git a/autotests/write/format/exr/Format_ARGB32_Premultiplied.exr b/autotests/write/format/exr/Format_ARGB32_Premultiplied.exr index 9a40410..a7c1052 100644 Binary files a/autotests/write/format/exr/Format_ARGB32_Premultiplied.exr and b/autotests/write/format/exr/Format_ARGB32_Premultiplied.exr differ diff --git a/autotests/write/format/exr/Format_ARGB6666_Premultiplied.exr b/autotests/write/format/exr/Format_ARGB6666_Premultiplied.exr index 84b22af..f480e31 100644 Binary files a/autotests/write/format/exr/Format_ARGB6666_Premultiplied.exr and b/autotests/write/format/exr/Format_ARGB6666_Premultiplied.exr differ diff --git a/autotests/write/format/exr/Format_ARGB8555_Premultiplied.exr b/autotests/write/format/exr/Format_ARGB8555_Premultiplied.exr index 9f53510..97de062 100644 Binary files a/autotests/write/format/exr/Format_ARGB8555_Premultiplied.exr and b/autotests/write/format/exr/Format_ARGB8555_Premultiplied.exr differ diff --git a/autotests/write/format/exr/Format_ARGB8565_Premultiplied.exr b/autotests/write/format/exr/Format_ARGB8565_Premultiplied.exr index 9f6fddb..8d6a3d7 100644 Binary files a/autotests/write/format/exr/Format_ARGB8565_Premultiplied.exr and b/autotests/write/format/exr/Format_ARGB8565_Premultiplied.exr differ diff --git a/autotests/write/format/exr/Format_RGBA8888_Premultiplied.exr b/autotests/write/format/exr/Format_RGBA8888_Premultiplied.exr index 2f1b2fd..4ed6669 100644 Binary files a/autotests/write/format/exr/Format_RGBA8888_Premultiplied.exr and b/autotests/write/format/exr/Format_RGBA8888_Premultiplied.exr differ diff --git a/src/imageformats/exr.cpp b/src/imageformats/exr.cpp index d74351f..4be5751 100644 --- a/src/imageformats/exr.cpp +++ b/src/imageformats/exr.cpp @@ -608,13 +608,13 @@ bool EXRHandler::write(const QImage &image) pixels.resizeErase(EXR_LINES_PER_BLOCK, width); // convert the image and write into the stream - auto convFormat = image.hasAlphaChannel() ? QImage::Format_RGBA16FPx4 : QImage::Format_RGBX16FPx4; + auto convFormat = image.hasAlphaChannel() ? QImage::Format_RGBA32FPx4 : QImage::Format_RGBX32FPx4; ScanLineConverter slc(convFormat); slc.setDefaultSourceColorSpace(QColorSpace(QColorSpace::SRgb)); slc.setTargetColorSpace(QColorSpace(QColorSpace::SRgbLinear)); for (int y = 0, n = 0; y < height; y += n) { for (n = 0; n < std::min(EXR_LINES_PER_BLOCK, height - y); ++n) { - auto scanLine = reinterpret_cast(slc.convertedScanLine(image, y + n)); + auto scanLine = reinterpret_cast(slc.convertedScanLine(image, y + n)); if (scanLine == nullptr) { return false; }