Working with DNG files, I am loading them into python script with RawPy, then using the raw_image() method to get a 2D array of the DNG values.
I need to crop this array and keep all the other metadata to be saved into another DNG file. To be clear I don’t convert the array to RGB, just cropping the 2D array with raw DNG pixel intensities – hence no interpolation is done before cropping. Is this doable in python?
Thank you in advance!!!
NB: I am aware there are is another questions along the same lines as mine, but it is unanswered, a few years old and subtly different as I am not converting to RBG before cropping.