cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ultra HDR formatted JPEG workflow from RAW

rborkows
Apprentice

Does anyone have a workflow to go from CR3 to gain mapped jpeg? This would produce jpegs that will display HDR on compatible hardware with the chrome browser: https://developer.android.com/media/platform/hdr-image-format

I don't see a way to do it in DPP or in darktable.

My R5 can save images as HEIF, however they're not compatible with Google Photos, and DPP has limited ability to edit it (Most of the usual sliders are inoperable). I'd prefer to make edits on the RAW source, and export to a format usable in web browsers both in SDR and HDR, and the gain mapped jpeg format seems to fit that.

1 REPLY 1

johnrmoyer
Whiz
Whiz

So far as I can understand, Canon DPP enforces the standard when doing HDR PQ with the result that many sliders are not available.

PQ portion of standard: https://en.wikipedia.org/wiki/Perceptual_quantizer 

The other portion of the standard: https://en.wikipedia.org/wiki/Rec._2100

Source code is at: https://github.com/google/libultrahdr  

There are two competing standards for HDR which means that for me neither is very useful. My television and my android phone each use one of the standards but not the other. The HDR PQ from a Canon camera or from Canon DPP works well on the television because it is also used in video. The android one works in chrome browser. The HDR PQ HIF works in Apple photos and Safari.

I have also built the Google jpegli from source and use that on my Debian Linux machine. https://github.com/libjxl/libjxl/tree/main/lib/jpegli 

I have built libraw from source and sometimes use that.

I use the exiftool and graphicsmagick in the Debian Stable distribution.

Here is my one of my attempts at creating such a work flow as you request:

/home/jrm/src/LibRaw-0.21.2/bin/dcraw_emu -v -disinterp -T -6  IMG_9590.CR3 
gm convert IMG_9590.CR3.tiff  -depth 16 IMG_9590.png
/home/jrm/src/libjxl/build2/tools/cjpegli -v IMG_9590.png   IMG_9590.jpeg
exiftool IMG_9590.jpeg -ICC_Profile'<='pq.icc

 

#add icc profile to png file
/home/jrm/src/libjxl/build/tools/decode_and_encode  IMG_8539c_test.png24 RGB_D65_202_Rel_PeQ  junk.png 
#extract icc profile to separate file
gm convert junk.png pq.icc
#create 16 bit png from HIF that Canon DPP had saved
gm convert ../2024Jan20/IMG_8539c.HIF -depth 16 IMG_8539c_test2.png
#use cjpegli to create jpeg
/home/jrm/src/libjxl/build2/tools/cjpegli -v IMG_8539c_test2.png  IMG_8539cli3.jpeg
#add icc file
exiftool IMG_8539cli3.jpeg -ICC_Profile'<='pq.icc
# i cannot remember whether this next command line did what I had hoped
/home/jrm/src/libjxl/build2/tools/cjpegli -v -x icc_pathname=pq.icc -x color_space=RGB_D65_202_Rel_PeQ IMG_8539c_test2.png  IMG_8539cli3.jpeg 

 

Avatar
Announcements