chausner / gimp-jxr

GIMP plugin for reading and writing of JPEG XR image files
BSD 3-Clause "New" or "Revised" License
25 stars 3 forks source link

hdr lost from the instant the .jxr is loaded #4

Open ACIXCIX0001 opened 11 months ago

ACIXCIX0001 commented 11 months ago

morning !

tried the extension, it can indeed load the image in gimp but even in 32 bits floating point + linear, the image displayed in gimp is nothing like the source image or as it s displayed in windows photo app or in wcg + hdr image viewer. the highlights are blown out, the whole image is messed up. wether you export the image in .jxr again, .exr, .hdr, and you open it again with windows photo app or in wcg + hdr image viewer, the image has anyway completely lost the hdr metadata. the capture in attm is taken with obs in hdr, on mpv, from an uhd bluray. you can notice the differences between the 2 renders : the original and, the same one loaded in gimp then exported in .jxr. do you manage to make your extension process .jxr with gimp as the description is claiming it to do on your side ? apparently the issue is that the extension does not keep the color bit depth when opening the .jxr in gimp.

https://1drv.ms/f/s!AiUmCeW6ezhq9yVezxM22Jt8F8_-?e=7WCCM6

chausner commented 11 months ago

Hi,

I do not see any visible difference between the two files you shared when opened in the Windows 11 Photos app or in IrfanView. I see that the original uses a 64 bit floating-point pixel format while the re-exported one uses 32 bit floating-point. That should be expected since, at least at the time when I wrote the plugin, GIMP did not support 64 bit floating-point. Therefore, the data is converted when imported in GIMP.

Which exact version of GIMP are you using? Are you using the binary release 2.1.1 of the plugin or are you building from source?

ACIXCIX0001 commented 10 months ago

thank for answering ! 2.10.34 the issue is just that,, it converte the 16 bits to 8 bits as soon as it load the .jxr in gimp, same thing with the photoshop extension, therefore it s becomes then impossible for gimp to export it again in tiff, exr, hdr and still retain the original 16 bits. here s another link where you have the original : https://1drv.ms/f/s!AiUmCeW6ezhq9yl2dNVv5Vm1SLxg?e=eoazZ3

do you display the image on hdr display, switched on in windows settings, 12 bpc output rgb format in nvidia control panel ?

chausner commented 10 months ago

Thanks for the clarification. The plugin was originally written for GIMP 2.8 which did not support higher bit depths. Therefore, the plugin basically converts every pixel format to 24bit RGB or 32bit RGBA.

GIMP 2.9 eventually introduced support for higher bit depths and I started porting the plugin to make use of it. However, work stalled in 2017 and the latest development state can be found in the gimp-2.9 branch. I think the basic load/save functionality was working for most pixel formats but some parts were untested or not finished.

Unfortunately, I do not have any binary builds of this development version but in case you are a developer, you could try to build from this source branch yourself. I remember that setting up the development environment on Windows was quite complicated, though. It's much easier on Ubuntu, and there are build instructions in the README.

ACIXCIX0001 commented 10 months ago

thank for answering ! too bad the extension is not updated to support for the incomming gimp 3.0, could be the only way to directly support hdr 32 bits .jxr directly out of the [obs, nvidia shadowplay] screenshot, to edit hdr images in any photo editing software without to pre convert it to .tif with jxrdecapp then edit it in software then back to .jxr for displaying it as intended in [windows photo app, hdr + wcg photo viewer].