letmaik / rawpy

📷 RAW image processing for Python, a wrapper for libraw
https://pypi.python.org/pypi/rawpy
MIT License
587 stars 67 forks source link

Canon CR3 file - raw_image_visible returning wrong image size? #200

Closed pootle closed 1 year ago

pootle commented 1 year ago

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

pootle commented 1 year ago

Actually this looks like a libraw problem - dcraw-emu shows the same problem.....