I just discovered Phatch and I think it's an absolutely brilliant
program—-very useful and very cleanly designed. Thank you very much!
I really liked the fact that you can write your own actions in Python
so I gave that a go as well.
Now I am however a bit stuck with unexpected interactions between the
actions I've written. My problem is a bit more complicated than what I
show below but in the interest of simplicity I'll describe it just
with reference to standard actions rather than custom ones.
Say I want to resize and rename an image and not lose its EXIF tags
(in reality my custom renaming even DEPENDS on the tags, but forget
about it for now).
If I do SCALE / RENAME then the result is a renamed version of the
original file (with the original EXIF tags), but with no scaling: even
if rename comes later, it renames the original rather than the result
of the pipeline until then. Ok, fair enough. Then…
If I do SCALE / SAVE / RENAME then the resulting file is indeed scaled
and renamed, but SAVE nukes the EXIF tags, even though I did tick the
"save metadata exif and itpc" in the batch options.
If I do SCALE / RENAME / SAVE then I get two files: a renamed unscaled
version of the original file PLUS a scaled but not renamed version of
If I just do SCALE / SAVE, I get a scaled file but the EXIF tags have
disappeared—-this just to confirm that SAVE actively destroys them,
regardless of other actions in the pipeline, despite my having ticked
that box. It just adds "Software: Phatch" and kills the rest.
If I do RENAME / SCALE / SAVE then again I get the two files: a
renamed version of the original file, with EXIF intact but no scaling,
as well as a scaled but not renamed version without the EXIF. I
enclose the file for this action list at the end of the post—-all the
others can be obtained by permutation/deletion of the actions.
So it looks like I'm hitting two independent problems here:
1) the SAVE action does not preserve the EXIF tags. How can I make it
do that? And what's the purpose of the tickbox in the batch options if
that's not what it does?
2) after a RENAME action, the next actions don't "continue" the
pipeline with the renamed file but instead operate on the one before
the renaming. How can I enforce that? Can I insert some kind of
"commit" action in the pipeline, or even better incorporate it into
the code of the RENAME action?
Thank you very much in advance
'Constrain Proportions': u'yes',
'Height': u'256 px',
'Resample Image': u'antialias',
'Scale down only': u'yes',
'Width': u'256 px',
'JPG Quality': u'70',
'JPG Size Maximum': u'0 kb',
'JPG Size Tolerance': u'5 %',
'PNG Optimize': u'yes',
'description': u'Describe here the action list.'}