Bug 492323

Summary: HDR output displays corrupted colours with some images
Product: [Applications] krita Reporter: Alvin Wong <alvin>
Component: HDRAssignee: Dmitry Testing <google-man>
Status: CONFIRMED ---    
Severity: normal CC: google-man
Priority: NOR    
Version First Reported In: 5.2.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot (may be clipped to SDR), right window is Krita.

Description Alvin Wong 2024-08-28 15:21:24 UTC
Created attachment 173045 [details]
Screenshot (may be clipped to SDR), right window is Krita.

SUMMARY

When HDR output is enabled in Windows and Krita, some images display in weird saturated, corrupted colours.

Tested image: https://github.com/AOMediaCodec/av1-avif/blob/master/testFiles/Netflix/avif/hdr_cosmos01000_cicp9-16-0_lossless.avif

STEPS TO REPRODUCE
1. Ensure HDR output is enabled on Windows and Krita
2. Open test image
3. Ensure OCIO is disabled.

OBSERVED RESULT
Canvas displays corrupted colours.

EXPECTED RESULT
Canvas should display the image in HDR with somewhat correct colours.

SOFTWARE/OS VERSIONS
Windows: Windows 10

ADDITIONAL INFORMATION
Reproducible on 5.2.3 and master (33eb6843).
Comment 1 Dmitry Testing 2024-08-29 09:30:27 UTC
I can confirm the issue. The artifacts appear only when a specific AVIF file (32f) is loaded. CandleGlass.exr (16f) loads fine. Converting the suggested AVIF into 16f and then back 32f makes it render correctly.