From 3632049e8acb413638ba48190ec0d0f6eb6c23cb Mon Sep 17 00:00:00 2001 From: David Plowman Date: Wed, 11 Jun 2025 09:05:26 +0100 Subject: [PATCH] Save the sensor name as the "Model" in DNG files Otherwise there's no way to identify the sensor and camera tuning file from the DNG file. This behaviour matches rpicam-still. Requires the udpated PiDNG. Signed-off-by: David Plowman --- picamera2/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/picamera2/request.py b/picamera2/request.py index 4cfca17d..8746f0bd 100644 --- a/picamera2/request.py +++ b/picamera2/request.py @@ -442,7 +442,8 @@ def save_dng(self, buffer: np.ndarray, metadata: Dict[str, Any], config: Dict[st config['stride'] = raw.shape[1] config['framesize'] = raw.shape[0] * raw.shape[1] - camera = Picamera2Camera(config, metadata) + model = self.picam2.camera_properties.get('Model') or "Picamera2" + camera = Picamera2Camera(config, metadata, model) r = PICAM2DNG(camera) dng_compress_level = self.picam2.options.get("compress_level", 0)