Skip to content

Commit 2bc55d0

Browse files
author
Dan Torop
committed
fujifilm_dynamic_range: only load if exiftool present
Fail to load if exiftool binary is not present. This may be better than silently (in UI) failing to read dyanmic range data.
1 parent d3cf564 commit 2bc55d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

contrib/fujifilm_dynamic_range.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
Compensate for Fujifilm raw files made using "dynamic range".
44
5-
Copyright (C) 2021 Dan Torop <[email protected]>
5+
Copyright (C) 2021, 2022 Dan Torop <[email protected]>
66
77
This program is free software; you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -116,6 +116,11 @@ local function destroy()
116116
dt.destroy_event("fujifilm_dr", "post-import-image")
117117
end
118118

119+
if not df.check_if_bin_exists("exiftool") then
120+
dt.print_log("Please install exiftool to use fujifilm_dynamic_range")
121+
error "[fujifilm_dynamic_range] exiftool not found"
122+
end
123+
119124
dt.register_event("fujifilm_dr", "post-import-image",
120125
detect_dynamic_range)
121126

0 commit comments

Comments
 (0)