Some cameras, such as the Ricoh GR III allow in-camera crops that output DNGs. The DNGs appear cropped but actually contain the full image data. Lightroom has a plugin that will ‘recover edges’ to create a new DNG at the full size.
Is there a way to do this with darktable, or would anyone know how to program it?
I am returning to this thread of mine. Here is an example - shot with the in-camera square format but the full 3:2 image should be available within the DNG. If this helps I can also upload an example DNG shot with an in-camera crop to 35mm (full FOV is 28mm). Some way to ‘uncrop’ or display full DNG would be great. I am not able to compile code but am happy to test out any DMGs provided on my Mac. Thanks. Lee
@lsdphoto: I’m nor sure this will be of any help to you but RawTherapee opens the DNG you made available in all its 3:2 glory. Here’s the down-scaled, unedited version that came out of RT:
darktable, I tested it on the latest development version, shows the squared crop.
If you are a darktable person you could maybe use RawTherapee to export the DNG as 16 (32?) bit floating TIF (the above one, 16 bit float, would be +/- 115Mb), import that in darktable and edit away.
Not ideal, but it might help you until (if?) darktable is able to handle this.
Thanks for the tip, I will give it a try. So, the DNG must have some metadata that describes the coordinates for the in-camera crop. DT is acting on this and RT is not and just taking the full data. I guess the ideal place for DT to offer an option for this is in the crop module, though maybe a preferences tick box for ‘full DNG or in-camera crop’ might be possible?
In the .config/darktable directory you open darktablerc, that’s the file holding the config data. Search for plugins/darkroom/rawprepare/allow_editing_crop, set it to TRUE and start dt, the “raw back/white point” module will show 4 new sliders defining the crop.
Before doing so, a few reminders:
This should be thought of as a debugging tool, not so for creative purposes.
The width and height naming should be understood as crop at right & lower border
You have to expect that the lens correction is not correct any more as sensor might now be out of centre. So the lensfun data (distortion and ca correction) are not calculated for that sensor and are not correct any more.
This is strictly not meant to be copy & pasted or to be included in styles. Why? a) sensor size is not checked for being valid any more and b) black/white point correction might be totally different. Even if you do this for images from the same camera!
Thanks for this. I have enabled this option and I now see the 4 new sliders. The DNGs in question are from a Ricoh GR III and the full size images all have values for these sliders of (68,40,44,24). If I set these values for my ‘zoomed-in’ crops, I then see the full uncropped DNG without any black borders to the image.
So, this works a treat! I can even make a preset with these values but, of course, the values of the other sliders (black levels and white point) do vary a little, so a preset is only of limited use. In my case, with these values set, lens correction seems to work OK - not that I ever know how accurate that is anyway!
Nonetheless, for the relatively rare times that I want to see the full un-cropped images, this seems to be a useful option.
Could you cheat and doctor the metadata in a copy. So copy the file to filename_uncropped and have a batch to add the correct numbers to the metadata…would that fool DT??
I don’t know whether exiv2 or exiftool can modify the tags. But don’t raise issues like “dt can’t read file …” after something went wrong.
You could try to set DefaultCrop & friends to sensor defaults and write new tags DefaultUserCrop to whatever you want as hints where the crop module should start… take care
I just thought it you could set it that it might be a work around as all you are doing is setting it back to the full image. Seems like if DT is reading that and following it from the in camera crop it would follow it correctly if you reset it to the full image…on a copy of course and as an experiment…
I did come across this in a forum so maybe it can be done
Open Terminal and navigate to the directory containing the image(s):
For a single image called BD3A6291.CR2 with dimensions of 5760 x 3840 execute:exiftool BD3A6291.CR2 -AspectFrame=“0 0 0 0” -DefaultCropOrigin="" -DefaultCropSize="" -CroppedImageWidth=“5760” -CroppedImageHeight=“3840”
Looks like you can use *.dng to do this as a batch…I just use the image size reported and that seems to work but maybe you would need to tweak it based on the active size settings…so another way to do it and this should be a full reset so that lens corrections etc works no??