OpenEXR export does not save 16-bit floating point precision
Environment/Versions
- GIMP version: 2.10.36 (well upgrading from 2.10.34 due to bug #10733 (closed))
- Package: gimp-2.10.36-setup.exe downloaded from the GIMP website
- Operating System: Windows
The bug is also in the 2.99.16 development version.
Description of the bug
Saving a EXR image as 16-bit floating point actually saves as 32-bit floating point.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Load a 16-bit floating point EXR file
- (or) Load and convert a 32-bit floating point EXR to 16-bit floating point precision.
- Select Export-As or Overwrite
- Close the current file, and open the file you just saved.
- Observe it is recognised as 32-bit floating point.
For example, I downloaded the 4K Normal EXR from https://polyhaven.com/a/coral_ground_02 It is a 16-bit floating point file that is 32,769 KB. After File/Overwrite, the file is now 100,828 KB. Opening the file again in GIMP indicates it is now 32-bit floating point. Changing the precision to 16-bit and saving again still leaves a large file.
As to why I'm doing this, I've observed that many (all?) grayscale files (e.g. roughness, displacement) on that website are actually 3-channel RGB. This causes Blender to actually store as 4-channel RGBA in GPU memory - which is a significant waste of GPU memory.
BTW I note that with PNG export, you are given a choice of format - with "automatic pixelformat" preselected in some cases.
Expected result: File is saved with 16-bit precision.
Actual result: File is saved with 32-bit precision.
Additional information
N/A