← Back to team overview

phatch-dev team mailing list archive

Variable border action

 

Hi Erich,

Thank you so much for writing Erich for contributing your first action
"Variable Border". I got bugged by many users for such an action, so I
am pretty sure they'll be happy now. Erichs border action will now
replace the old border action since the crop action and the variable
border action provide the same functionality and much more. If anyone
objects to this, I like to hear.

I corrected the description to "Draw border inside or outside". It is
a bit cryptic, but the criterion is that it should fit into the add
actions dialog. As a rule of thumb I'd like to keep the English
description even a bit shorter, as translations in other languages
tend to be larger. Also for pixel values, PixelFields should be used.
Please have a look at how I updated the values() method so percentages
are calculated correctly. (Nadia, this is also interesting for you in
case you would not know this yet.) So Erich, you need to merge from my
branch (> rev 733).

Writing an action seems to be the entry procedure for becoming a
Phatch developer ;-)

Erich, please let us know what you like to work on next. It is of
course the most efficient to propose features you have knowledge and
time to work on yourself. My main (future) focus for Phatch
development is image manipulation, integrating other applications
(such as imagemagick, dcraw, ...) and user interface. But of course I
will be very happy to any proposed contribution and guide anyone
through the Phatch code.

For example, if you want to work on multiprocessing, you'll have to
refactor core/api.py and evaluate if it is more efficient to share the
cache or each process has its own cache. In case of the shared cache
dictionary take in account that some data it contains is not pickable,
mainly PIL Image objects. Or maybe it would be a good idea to have two
caches: a shared one, which contains eg a gps timedict, and an non
shared one, which contains eg large images. Maybe you want to work on
something else, which is fine as well. In case you consider
multiprocessing for speed increase, I guess Phatch could use some
profiling as well as its code is not optimized for speed. My main
focus is that "it just works(TM)" out of the box, stability and a
polished UI. So some aspects of Phatch are very speed inefficient,
which because of lack of time I leave to anyone who likes to work on
it. For example at every start, Phatch imports all actions and scales
all icons from wxPython->PIL (antialias) -> wxPython for the smaller
icons in the tree view. Probably it would be better to cache the icons
at the right sizes. The icons rescaling of course happens only when
Phatch is launched as a GUI, but even in server mode all actions are
imported, while probably it would be better to import only those which
are in the action lists. Of course to know the bottlenecks Phatch has
to be profiled. When Nadia asked me if I was not curious to profile
Phatch as it is so easy to do, I answered that indeed I would be very
curious if someone else profiles Phatch.

My golden rule is that everyone should works on what he finds fun,
with the sole exception of maintaining your contributed code (fixing
bugs, writing documentation, ...). The nice thing is that your fun
will be passed to many users and bring in new users.

Welcome to the team!

Stani

-- 
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be