Fix wrong rotation being used for DNG

This commit is contained in:
Kristian Vos
2024-11-04 15:04:30 +01:00
parent 98ae16848c
commit 22fc1309c5

View File

@@ -1042,15 +1042,15 @@ static void
save_dng(const uint8_t *image, char *fname, int count)
{
uint16_t orientation;
if (state_proc.device_rotation == 0) {
if (state_proc.camera_rotation == 0) {
orientation = state_proc.mode->mirrored ?
LIBDNG_ORIENTATION_TOPRIGHT :
LIBDNG_ORIENTATION_TOPLEFT;
} else if (state_proc.device_rotation == 90) {
} else if (state_proc.camera_rotation == 90) {
orientation = state_proc.mode->mirrored ?
LIBDNG_ORIENTATION_RIGHTBOT :
LIBDNG_ORIENTATION_LEFTBOT;
} else if (state_proc.device_rotation == 180) {
} else if (state_proc.camera_rotation == 180) {
orientation = state_proc.mode->mirrored ?
LIBDNG_ORIENTATION_BOTLEFT :
LIBDNG_ORIENTATION_BOTRIGHT;