LibRaw I/O layer (LibRaw*datastream) has changed (simplified) in LibRaw 0.20, so if FreeImage uses own LibRaw I/O implementation (subclass of LibRaw_abstract_datastream) it should be changed too.
Thanks. Hopefully that will support the compression option of these cameras also? How long does it then typically take MS to incorporate them into the add-ons for Windows Explorer?
Hi Alex, I decode a leica M8 DNG file with unprocessed_raw compiled with adobe DNG SDK 1.5.1, after RawProcessor.unpack() with LIBRAW_SUCCESS return, I found both RawProcessor.imgdata.rawdata.color3_image and RawProcessor.imgdata.rawdata.color4_image is NULL. I can not get that unprocessed raw data. But use dcraw_emu without adobe DNG SDK, I can get a tiff file. and I can get an unprocessed data tiff file (called stage 1 data) with dng_validate, which is a sample of adobe dng sdk.
the sample file is here: https://www.dropbox.com/s/yheqp9lkvuut2ee/LEICA_M8.DNG?dl=0
another sample of Leica DMR DNG: https://www.dropbox.com/s/n9iee4b5rse4ukv/Leica_DMR_R8_L1185423.DNG?dl=0
the same problem as M8. :-(
thank you for your response
BTW, if you have more samples from this camera, could you please share it, if possible?
In this specific sample, BaselineExposure tag is set way to high (+2.32), that results in too light rendering in Adobe tools.
it would be interesting to know is that tag setting is systematic, or resulted from some camera settings (e.g. highlight priority, resulting in underexposure)
1) This is 'linear DNG' (demosaiced) with 12 bit data
| | 3) BitsPerSample = 12 12 12
So, expected 'real max' value is 4095. In reality it is 4136, that's why LibRaw's decoder warns about data corruption (data value is outside manifested limit)
2) unprocessed_raw sample supports only bayer (not demosaiced) files right now, so you may need to write some code
After LibRaw::open_file() and LibRaw::unpack(), the (unprocessed) data is accessble via
-imgdata.rawdata.color3_image as an array of 3-component pixels
or
- imgdata.rawdata.color4_image as an array of 4-component pixels (for 3-color DNG, 4th component will be always zero)
Only one pointer is not NULL, check before use.
Historically, Adobe DNG SDK fills colr3_image array, but libraw internal decoder(s) use color4_array
When yo set use_camera_wb, LibRaw uses camera reported WB coefficients.
If not, 'daylight WB' coeffs are calculated from built-in color profile, this coeff may differ.
To avoid (most of) clipping due to auto bright, one may set auto_bright_thr to very low value (e.g. 0.0)
When I set use_camera_wb and use_auto_wb both to zero, I get a yellow cast on the image. When I set use_camera_wb to 1 and take the same photo with camera WB set to daylight it there is no yellow cast. (Camera is Sony A7R4, but I get similar results from Olympus Pen-F). I can email you sample images if you don't believe me.
Is anything else that could affect WB?
Here is the code I am using to read and process the image:
Will this be supported in the near future?
Thorsten
R5 uses new metadata format which is not supported by LibRaw 0.20.
We plan to support it in next public snapshot.
Do you have any plan to support brand new Sony A7C?
Thanks in advance.
/Yangsoo
It seems like a lot of time has passed, but is there any solution?
If you're talking about 'Microsoft RAW image extension', please contact vendor (Microsoft).
We're not involved in this product development in any way and not responsible for it.
Hello Alex,
thanks for your answer!
So I will have to wait for a new FreeImage version or try to fix the FreeImage environment myself - good to know that :-)
Thanks again and merry Christmas,
Michael
Sorry, know nothing about FreeImage.
LibRaw I/O layer (LibRaw*datastream) has changed (simplified) in LibRaw 0.20, so if FreeImage uses own LibRaw I/O implementation (subclass of LibRaw_abstract_datastream) it should be changed too.
We're completely unaware of MS schedule
Thanks. Hopefully that will support the compression option of these cameras also? How long does it then typically take MS to incorporate them into the add-ons for Windows Explorer?
Thanks.
EOS R5/R6 support is expected in next 'public snapshot'
Hi, when will it be compatible with the canon eos R5 camera?
std::map test; ->
std::map<std::string, LibRaw> test;
Leica M8 is bayer camera, so data is expected in imgdata.rawdata.raw_image
I suggest you to read the docs: https://www.libraw.org/docs/API-datastruct.html#libraw_rawdata_t
Hi Alex, I decode a leica M8 DNG file with unprocessed_raw compiled with adobe DNG SDK 1.5.1, after RawProcessor.unpack() with LIBRAW_SUCCESS return, I found both RawProcessor.imgdata.rawdata.color3_image and RawProcessor.imgdata.rawdata.color4_image is NULL. I can not get that unprocessed raw data. But use dcraw_emu without adobe DNG SDK, I can get a tiff file. and I can get an unprocessed data tiff file (called stage 1 data) with dng_validate, which is a sample of adobe dng sdk.
the sample file is here: https://www.dropbox.com/s/yheqp9lkvuut2ee/LEICA_M8.DNG?dl=0
another sample of Leica DMR DNG: https://www.dropbox.com/s/n9iee4b5rse4ukv/Leica_DMR_R8_L1185423.DNG?dl=0
the same problem as M8. :-(
thank you for your response
Thanks a lot.
It looks like BaselineExposure +2... is common for these files. Also, these samples displays correctly if BaselineExposure is applied.
BTW, in 1st file (11_2.5x) data maximum is 503 in green channel, so only 9 bits out of 12 are used.
Sorry for late response. here are some samples.
https://www.dropbox.com/s/ytepf7syy3k6585/IMG_0011_2.5x.DNG?dl=0
https://www.dropbox.com/s/4g8vr84wu9ahv5f/IMG_0012_1x.DNG?dl=0
https://www.dropbox.com/s/tmfjjwt0yv597c0/IMG_0013_.5.DNG?dl=0
Hope those samples were useful.
BTW, if you have more samples from this camera, could you please share it, if possible?
In this specific sample, BaselineExposure tag is set way to high (+2.32), that results in too light rendering in Adobe tools.
it would be interesting to know is that tag setting is systematic, or resulted from some camera settings (e.g. highlight priority, resulting in underexposure)
Thanks Alex,I will try later.
1) This is 'linear DNG' (demosaiced) with 12 bit data
| | 3) BitsPerSample = 12 12 12
So, expected 'real max' value is 4095. In reality it is 4136, that's why LibRaw's decoder warns about data corruption (data value is outside manifested limit)
2) unprocessed_raw sample supports only bayer (not demosaiced) files right now, so you may need to write some code
After LibRaw::open_file() and LibRaw::unpack(), the (unprocessed) data is accessble via
-imgdata.rawdata.color3_image as an array of 3-component pixels
or
- imgdata.rawdata.color4_image as an array of 4-component pixels (for 3-color DNG, 4th component will be always zero)
Only one pointer is not NULL, check before use.
Historically, Adobe DNG SDK fills colr3_image array, but libraw internal decoder(s) use color4_array
Alternatively, one may use camera preset from imgdata.color.WB_Coeffs/WBCT_Coeffs if present for specific camera(raw file)
When yo set use_camera_wb, LibRaw uses camera reported WB coefficients.
If not, 'daylight WB' coeffs are calculated from built-in color profile, this coeff may differ.
To avoid (most of) clipping due to auto bright, one may set auto_bright_thr to very low value (e.g. 0.0)
A further note, probably irrelevant -- if I set no_auto_bright to zero, the white balance looks better - but some of the channels are clipped.
When I set use_camera_wb and use_auto_wb both to zero, I get a yellow cast on the image. When I set use_camera_wb to 1 and take the same photo with camera WB set to daylight it there is no yellow cast. (Camera is Sony A7R4, but I get similar results from Olympus Pen-F). I can email you sample images if you don't believe me.
Is anything else that could affect WB?
Here is the code I am using to read and process the image:
// create an image processor
LibRaw iProcessor;
// open the file and read the metadata
err = iProcessor.open_file(pathname);
if(err != 0)
return(TRUE);
// set to 16-bit output
iProcessor.imgdata.params.output_bps = 16;
iProcessor.imgdata.params.no_auto_bright = 1;
iProcessor.imgdata.params.use_camera_wb = 0;
iProcessor.imgdata.params.use_auto_wb = 0;
// metadata is accessible through data fields of the class
nx = iProcessor.imgdata.sizes.width;
ny = iProcessor.imgdata.sizes.height;
// unpack the image
err = iProcessor.unpack();
if(err != 0)
goto error;
// process the image
err = iProcessor.dcraw_process();
if(err != 0)
goto error;
Pages