JPXL preview in DNG, Adobe DNG SDK
I've integrated LibRaw with the Adobe DNG SDK, but it seems dcraw_make_mem_thumb() cannot be used to extract the embedded JPXL preview?
I can extract the embedded JPXL using ExifTool and save it to disk. The resulting JXL has 5472x3648 pixel and loads fine in Photoshop and Affinity. It looks like the "developed" DNG in ACR.
In my code, I do basically this:
...
plraw->set_dng_host(host.get());
plraw->imgdata.rawparams.use_dngsdk = LIBRAW_DNG_ALL;
plraw->imgdata.rawparams.options |= LIBRAW_RAWOPTIONS_ALLOW_JPEGXL_PREVIEWS;
plraw->open_file()
plraw->unpack_thumb()
libraw_processed_image_t* pthumb = plraw->dcraw_make_mem_thumb();
but dcraw_make_mem_thumb() returns null. When I do the same with e.g. a NEF file, dcraw_make_mem_thumb returns the embedded preview. I would expect that it returns the embedded JPXL preview?
Since dcraw_make_mem_thumb() returns null, I do the normal processing
plraw->unpack()
plraw->dcraw_process()
...
but that produces an image that looks quite different (darker, less contrast) than the embedded preview in the DNG.
Am I missing a step? Should plraw->dcraw_make_mem_thumb() not return the JPXL preview?
Recent comments