LibRaw with Adobe DNG SDK 1.7
Today I've tried to get LibRaw working with DNG SDK 1.7 using Visual C++ 2022.
I've downloaded the latest LibRaw snapshot from Github.
After some struggling I've managed to create a .lib for the DNG SDK (Adobe should really include a VC solution for that) and then I've following the instructions in README.DNGSDK.txt
My first tests show that this apparently works many of my sample DNG files, but it fails for others, producing "wrong" colors with a bad magenta cast. See attached image 003 (image 002 is the same photo loaded in ACR with default settings).
I'm not all to deep into RAW processing, so I really don't know where to start or which of the many LibRaw parameters and options impact this.
Here is the code I use (I save the LibRaw output to a TIF file for further processing).
dng_host host; host.SetPreferredSize(0); host.SetMinimumSize(2000); host.SetMaximumSize(0); auto plraw = std::make_unique<LibRaw>(LIBRAW_OPIONS_NO_DATAERR_CALLBACK); plraw->set_dng_host(&host); plraw->imgdata.rawparams.use_dngsdk = LIBRAW_DNG_ALL; plraw->imgdata.rawparams.options |= LIBRAW_RAWOPTIONS_ALLOW_JPEGXL_PREVIEWS; plraw->imgdata.params.use_camera_wb = 1; plraw->imgdata.params.use_auto_wb = 1; plraw->imgdata.params.highlight = 0; plraw->imgdata.params.user_qual = 3; plraw->imgdata.params.output_color = 1; memset(plraw->imgdata.params.gamm, 0x0, sizeof(plraw->imgdata.params.gamm)); plraw->imgdata.params.gamm[0] = 1 / 2.4; plraw->imgdata.params.gamm[1] = 12.92; plraw->imgdata.params.bright = 1; plraw->imgdata.params.no_auto_bright = 0; plraw->imgdata.params.auto_bright_thr = 0.002f; plraw->imgdata.params.exp_correc = 1; plraw->imgdata.params.output_bps = 8; plraw->imgdata.params.output_tiff = 1; plraw->unpack(); plraw->dcraw_process(); plraw->dcraw_ppm_tiff_writer(... ...
Any help or suggestions greatly appreciated.
I've had problems uploading the second file. Hopefully this works. It shows in the preview.
Recent comments