official/auto_straighten - Added check for Nikon cameras where

rotation is opposite of Canon and thus requires the sign to be
changed.
This commit is contained in:
Bill Ferguson
2026-05-30 15:04:47 -04:00
parent 7531a29235
commit 53549f16b5

View File

@@ -211,9 +211,14 @@ local function straighten_image(image)
for line in pipe:lines() do
local pr, val = string.match(line, "(.).+: (.+)")
if pr == "R" then
local sign = 1.0
dt.print_log("roll angle is " .. val)
log.msg(log.debug, "roll angle is " .. val)
roll = determine_correction(tonumber(val))
-- check for Nidon and change the sign
if string.match(string.upper(image.exif_maker), "NIKON") then
sign = -1.0
end
roll = determine_correction(tonumber(val) * sign)
dt.print_log("corrected roll angle is " .. roll)
log.msg(log.debug, "corrected roll angle is " .. roll)
elseif pr == "P" then