[Digikam-devel] context script to align and enfuse
Arnd Baecker
arnd.baecker at web.de
Tue Feb 5 08:17:07 GMT 2008
On Tue, 5 Feb 2008, Gerhard Kulzer wrote:
> On Monday 04 February 2008 Arnd Baecker wrote:
> > Hi Gerhard,
> >
> > On Mon, 4 Feb 2008, Gerhard Kulzer wrote:
> >
> > > I just created a script that I wanted to do for a long time now. Here is how it works:
> > > a) A <you_name_it>.desktop file need to be put into ~/.kde/share/applnk/.hidden/
> > > b) A script file needs to be referenced. I used ~/Scripte/enfuse. You have to put in the path where you store the script
> > > c) the script must be executable for the user (chmod o+x or chmod 700)
> > > d) select at least 2 files for HDR, they should be almost identical in their framing, slight differences will be realigned with align_image_stack program.
> > > e) right-click on them (digiKam restart required after .desktopn file installation) and you'll find 'enfuse' in the 'Open with' context menu
> > > f) have fun, the enfused image will show up in the same folder with a _enfuse insetion into the file name
> > > exiftool is used to copy metadata to the newly created image
> > >
> > > Todo
> > > I didn't yet manage to change the 'create date' of the new file to the exif create date. Anybody out there who knows how to do that? (except by by hand with digiKam obviously!)
> >
> > If you omit the -P, does that work?
> It actually doesn't matter, -P keeps the mtime of the new file, but mtime we don't care. I want to give it ctime of one of the original images.
> With exiv2 -T afile bfile I can change the mtime of the file, but digikam sorts images on ctime.
> I checked through the timeadjust code of the kipis and libkexiv2, but I can't find out where ctime is changed :-(
Hmm, maybe this is just done by the OS?
What about using touch, as suggested here
http://www.macosxhints.com/article.php?story=20070104072657423
?
> > Or do you mean that you want to change the mtime of the file on disk?
> > Maybe with jhead:
> > http://planet.gentoo.org/developers/agriffis/2005/11/25/adjusting_exif_date_time_with_jhead
> >
> > > A version with exiv2 would be welcome too to limit dependencies.
> >
> > Yes ... ;-) (see below)
> >
> > This is nice (though I haven't tested it, because I have
> > my own enfuse script, which is very similar ;-).
> >
> > Some comments:
> > a) I would not call the script enfuse because this could
> > be confused with enfuse (which does the real job ;-)
> good point !
> > b) all the temporary files from the alignment are
> > created in the directory where the originals are, i.e.
> > in a directory visible to digikam. So the temporary
> > images get added and deleted from the database
> > (and become visible inbetween).
> > Using a temporary directory might be better.
> My script actually takes care of that, it used /tmp
Ouch, I overlooked that ....
> > c) I also use exiftool in my script, I did not find a
> > simple equivalent to
> > exiftool -TagsFromFile "%s" -all:all "%s"
> > d) At the end I use:
> > exiv2 ad -a 00:00:01 "%s"
> > so that in a time-ordered view the enfused image appears
> > after the originals
> good point !
> > (just a matter of taste).
> >
> > e) The whole procedure of adding such a simple script is
> > too complicated. We need
> > http://bugs.kde.org/show_bug.cgi?id=88932
> > don't we ?
> totally agree, but dedicated plugin would be even better
Why? Do you think of one with which you can adjust
some of the parameters given to enfuse?
Somehow I have the feeling that doing a kipi-plugin
(in particular coded in C++) for all such simple tasks
is just too much effort compared to using scripting languages
like python, together with bindings like pyqt or wxpython
for the GUI.
Actually, on the panotools-ng mailing list, several
enfuse "droplets" are discussed (I think exclusively for Windows
or Mac).
Best, Arnd
More information about the Digikam-devel
mailing list