Skip to content

Commit f8c076f

Browse files
committed
contrib/fujifilm_dynamic_range - added check for duplicates after an
image is processed. If duplicates are found the exposure bias is applied to them.
1 parent 5727b2d commit f8c076f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

contrib/fujifilm_dynamic_range.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,17 @@ local function detect_dynamic_range(event, image)
126126
-- note that scene-referred workflow exposure preset also pushes exposure up by 0.5 EV
127127
image.exif_exposure_bias = image.exif_exposure_bias + tonumber(raf_result)
128128
dt.print_log("[fujifilm_dynamic_range] raw exposure bias " .. tostring(raf_result))
129+
-- handle any duplicates
130+
if #image:get_group_members() > 1 then
131+
local basename = df.get_basename(image.filename)
132+
local grouped_images = image:get_group_members()
133+
for _, img in ipairs(grouped_images) do
134+
if string.match(img.filename, basename) and img.duplicate_index > 0 then
135+
-- its a duplicate
136+
img.exif_exposure_bias = img.exif_exposure_bias + tonumber(raf_result)
137+
end
138+
end
139+
end
129140
end
130141

131142
local function destroy()

0 commit comments

Comments
 (0)