Canon Ra camera with CR3 files is not cropping the right / bottom off the sensor data correctly.
exiftool reports:
Sensor Width : 6888
Sensor Height : 4546
Sensor Left Border : 156
Sensor Top Border : 58
Sensor Right Border : 6875
Sensor Bottom Border : 4537
returned image is 4498 x 6742
but it should be 4480 x 6720
it looks like right / bottom border values are not being picked up. If I crop 22 from right and 18 from bottom I get an image that matches the image from other apps and the camera's own jpeg version.
6875+1 - 156 => 6720
6888 - 156 => 6732
I am on version 0.20.2, but there doesn't seem to be anything in changelog for 0.21 that might fix this
dcraw-emu generates output files that demonstrate this
LibRaw tries to extract as
LibRaw tries to extract as much image as possible, so 'match with other apps' is not default.
If one prefers vendor crop(s), please take look at (v 0.21):
1) imgdata.sizes.raw_inset_crops https://www.libraw.org/docs/API-datastruct-eng.html#libraw_image_sizes_t
2) And LibRaw::adjust_to_raw_inset_crop(..) call https://www.libraw.org/docs/API-CXX.html#adjust_to_raw_inset_crop
-- Alex Tutubalin @LibRaw LLC
But this extracts outside the visible sensor area.......
OK I can fix it like that but surely it should return the "visible" sensor area?
It is cropping off the left / top sensor margin correctly, why return the invalid data from the right/bottom margin?
We do not have sample files
We do not have sample files from EOS Ra camera (so this camera not listed as 'supported'), could you please provide several ones?
-- Alex Tutubalin @LibRaw LLC
Some sample files
Here's a link to a folder with some sample files. https://drive.google.com/drive/folders/1DwMJFINzWfmGnCNYz7FptMZ74m5u8439...
Note the first 3 files are basically black, last 2 are 'real' photos.
The Camera is just a Canon R with a modified infra-red cut filter, apart from the name change, the files should look exactly like Canon R files
Thank you for sample files;
Thank you for sample files; downloaded, you may remove them to clean up google drive space.
The 6742x4498 crop looks correct, no black/white borders on image: https://www.dropbox.com/s/ugnygdg8gp7dpx5/Screenshot%202023-04-16%201529...
-- Alex Tutubalin @LibRaw LLC
Thanks for looking into that
Thanks for looking into this so quickly, I still think the crop should match the metadata in the file, then the returned data would match the jpeg the camera produces as well as other apps etc. but as you say, there is real picture info there, and the choice is yours!
LibRaw provides vendor crops
LibRaw provides vendor crops as described in my 1st reply: https://www.libraw.org/comment/6618#comment-6618
-- Alex Tutubalin @LibRaw LLC