Skip to content

Fix for 433877: Non-square Radiance/RGBE/.hdr images fail to load

The HDR QImageIOHandler plugin only supports the default image orientation (-Y +X) in .hdr files. It mixes up the width and height however, resulting in non-square images not loading.

This fix adds a check for the standard image orientation in the file and returns false (with error message) if that fails. If it succeeds, it takes the height from the -Y component, and the width from the +X component, resulting in successful loading of the image.

Implementing support for the other 7 possible image orientations is be possible, however that would make the code changes a lot more drastic. Since I have yet to encounter such image, I chose to just fix the already supported orientation (-Y+X).

Merge request reports

Loading