Attached is my current version of the icc-export.lua.
Things that are not good (maybe because lack of lua/dt knowledge):
1. I cannot force tif format, so my "storage" won't work if export to
jpeg is setup.
2. There is no way to add fields into the storage. This means that the
only way to configure this script is via a global preference. Problem is
that we can't then have different ICC profile used.
And maybe many other limitations, this is really a first version!
Pascal.
--
Pascal Obry / Magny Les Hameaux (78)
The best way to travel is by means of imagination
http://v2p.fr.eu.org
http://www.obry.net
gpg --keyserver keys.gnupg.net --recv-key F949BD3B
dt = require "darktable"
-- the preference
dt.preferences.register("icc-export","ICC Profile","string","The pathname to the ICC profile to use","This must be an absolute path","~/Images/dt-icc-export.icc")
function store_callback(storage,image,format,filename,num,total,high_quality,extra_data)
-- the profile
iccprof = dt.preferences.read("icc-export","ICC Profile","string")
-- prefix the output file basename with "icc_"
iccfile=string.gsub(filename, "(.*/)(.*)", "%1icc_%2")
command = "tificc -o \""..iccprof.."\" -t0 "..filename.." "..iccfile
os.execute(command)
os.remove(filename)
command = "eog "..iccfile
os.execute(command)
os.remove(iccfile)
end
dt.register_storage("module_print","View with Profile",store_callback,nil)
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel