That was me over at dpreview, just with a different hat on…
I’m working on a proper fix to this problem. So far I have this in my luarc
: the RAW crop is applied only when necessary:
local dt = require "darktable"
local df = require "lib/dtutils.file"
local SEP = dt.configuration.runnin_os == "windows" and "\\" or "/"
local function shading_compensation_on(image)
local exiv2 = df.check_if_bin_exists("exiv2")
if not exiv2 then
dt.print(_("Unable to find exiv2 command."))
return false
end
local p = io.popen(exiv2
.." -K Exif.OlympusCs.ShadingCompensation "
..image.path..SEP..image.filename)
if not p then return false end
local line = p:read("*l")
p:close()
return line and line:find("On", 1, true) ~= nil
end
local function crop_right_border_on_import(event, clean, image)
if not clean then return end
if image.exif_maker ~= "OLYMPUS CORPORATION" or image.exif_model ~= "E-M5MarkIII" then
return
end
if shading_compensation_on(image) then
dt.gui.action("iop/rawprepare/crop right", "value", "set", 32)
end
end
dt.register_event("em5_iii_crop", "darkroom-image-loaded", crop_right_border_on_import)
For the above to work, plugins/darkroom/rawprepare/allow_editing_crop
must be set to true
in darktablerc
.
If people see this effect with different camera models, could they please post their names here?