From f5248b388e061c461fa520f93bfd3fd84a412f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferass=20El=C2=A0Hafidi?= Date: Tue, 24 Dec 2024 15:52:41 +0000 Subject: [PATCH] process_pipeline.c: fix call to libdng_write --- src/process_pipeline.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/process_pipeline.c b/src/process_pipeline.c index 1424b29..395389f 100644 --- a/src/process_pipeline.c +++ b/src/process_pipeline.c @@ -1059,6 +1059,7 @@ static void save_dng(const uint8_t *image, char *fname, int count) { uint16_t orientation; + if (state_proc.camera_rotation == 0) { orientation = state_proc.mode->mirrored ? LIBDNG_ORIENTATION_TOPRIGHT : @@ -1154,13 +1155,14 @@ save_dng(const uint8_t *image, char *fname, int count) state_proc.calibration.forward_matrix_2[8] ); - //printf("Writing frame to %s, %d x %d\n", fname, state_proc.mode->width, state_proc.mode->height); + printf("Writing frame to %s, %d x %d\n", fname, state_proc.mode->width, state_proc.mode->height); libdng_write(&dng, fname, state_proc.mode->width, state_proc.mode->height, image, - count); + (libmegapixels_mode_width_to_bytes(state_proc.mode->format, + state_proc.mode->width) * state_proc.mode->height)); libdng_free(&dng); /*