Closed eat-sleep-code closed 2 years ago
Hi, thanks for the question.
So I think the problem is that you're using switch_mode_and_capture_image
which returns a PIL image in RGB format, and there's no way to get back from this to the raw buffer from which you could save a DNG.
There are many ways to do all this, but we also provide a couple of examples that might help: https://github.com/raspberrypi/picamera2/blob/main/examples/capture_dng.py captures just the DNG, whereas https://github.com/raspberrypi/picamera2/blob/main/examples/capture_dng_and_jpeg.py captures both a JPEG and a DNG.
Please let us know if there's anything else we can help with. Thanks!
Hi, just wondering if there was any update here or anything related that we can help with? Thanks!
Hi, I think I'll close this one for now if that's ok, but please open a new issue if there's anything else for us to look at. Thanks!
Please only ask one question per issue!
Describe what it is that you want to accomplish I have this code:
I am calling it like this...
Describe alternatives you've considered I am trying to migrate an existing picamera project to picamera2
Additional context Here is the current repo: https://github.com/eat-sleep-code/camera/tree/picamera-2-migration