[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

ANN: Phatch = PHoto bATCH processor and renamer based on PIL

spe.stani.be

2/18/2008 2:59:00 PM

I'm pleased to announce the release of Phatch which is a
powerful batch processor and renamer. Phatch exposes a big part of the
Python Imaging Library through an user friendly GUI. (It is using
python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch
is not targeted at manipulating individual pictures (such as with
Gimp), but repeating the same actions on hundreds or thousands of
images.

If you know PIL and have some nice recipes laying around, it is very
easy to write plugins as Phatch generates the corresponding GUI
automagically just like in Django. Any existings PIL scripts can be
added very easily. Let me know if you want to contribute or have any
questions.

Homepage: http://photobatc... (free download link below)
Tutorials: http://photobatch.w......
Translations: https://translations.launchpad.net/phatch/trunk/+p...
License: GPLv3
Screenshot: http://photobatch.w.../local--files/start/Screenshot-Ph...
(the perspective and reflection is produced by Phatch itself)

Phatch has many features, like:
- EXIF information inspector with thumbnail
- limit jpeg file size when saving
- tons of actions organized by tags (including perspective, round
corners, shadow, reflection, ...)
- console version (Phatch can now run without a gui on servers)
- batch rename and copy files based on exif metadata
- data stamping (http://photobatch.w...)
- online documentation wiki (http://photobatch.w...)

Linux only features:
- desktop or panel droplets on which images or folders can be dropped
(will be ported to Windows & Mac)
- Nautilus and desktop integration (with its own mime type and
nautilus extension)
- manpage with examples

With python-pyexiv2 the following featues are added:
- embedding the original EXIF and IPTC tags in the image

All actions mostly have a separate pil function in their source code,
so they could be read as a recipe book for PIL:
* Auto Contrast - Maximize image contrast
* Background - Put colour under transparent image
* Border - Crop or add border to all sides
* Brightness - Adjust brightness from black to white
* Canvas - Crop the image or enlarge canvas without resizing the image
* Colorize - Colorize grayscale image
* Common - Copies the most common pixel value
* Contrast - Adjust from grey to black & white
* Convert Mode - Convert the color mode of an image (grayscale, RGB,
RGBA or CMYK)
* Copy - Copy image file
* Effect - Blur, Sharpen, Emboss, Smooth, ...
* Equalize - Equalize the image histogram
* Fit - Downsize and crop image with fixed ratio
* Grayscale - Fade all colours to gray
* Invert - Invert the colors of the image (negative)
* Maximum - Copies the maximum pixel value
* Mask - Apply a transparency mask
* Median - Copies the median pixel value
* Minimum - Copies the minimum pixel value
* Offset - Offset by distance and wrap around
* Posterize - Reduce the number of bits of colour channel
* Perspective - Shear 2d or 3d
* Rank - Copies the rank'th pixel value
* Reflect - Drops a reflection
* Rename - Rename image file
* Rotate - Rotate with random angle
* Round - Round or crossed corners with variable radius and corners
* Saturation - Adjust saturation from grayscale to high
* Save - Save an image with variable compression in different types
* Scale - Scale an image with different resample filters.
* Shadow - Drop a blurred shadow under a photo with variable position,
blur and color
* Solarize - Invert all pixel values above threshold
* Text - Write text at a given position
* Transpose - Flip or rotate an image by 90 degrees
* Watermark - Apply a watermark image with variable placement (offset,
scaling, tiling) and opacity

I develop Phatch on Ubuntu/Linux, but I have tested and polished it
regularly on Windows and Mac Os X. (Only the droplet functionality
needs to be ported.) Phatch is submitted to Debian unstable and
Ubuntu Hardy. Packagers for other platforms are welcome.

Requirements:
- PIL 1.1.5 or higher
- wxPython 2.6 or higher
- pyexiv2 (optional)
- python nautilus bindings (optional)

Best regards,
Stani
--
http://pythonid...
26 Answers

Daniel Fetchinson

2/19/2008 3:23:00 AM

0

On 2/18/08, SPE - Stani's Python Editor <spe.stani.be@gmail.com> wrote:
> I'm pleased to announce the release of Phatch which is a
> powerful batch processor and renamer. Phatch exposes a big part of the
> Python Imaging Library through an user friendly GUI. (It is using
> python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch
> is not targeted at manipulating individual pictures (such as with
> Gimp), but repeating the same actions on hundreds or thousands of
> images.
>
> If you know PIL and have some nice recipes laying around, it is very
> easy to write plugins as Phatch generates the corresponding GUI
> automagically just like in Django. Any existings PIL scripts can be
> added very easily. Let me know if you want to contribute or have any
> questions.
>
> Homepage: http://photobatc... (free download link below)
> Tutorials: http://photobatch.w......
> Translations: https://translations.launchpad.net/phatch/trunk/+p...
> License: GPLv3
> Screenshot:
> http://photobatch.w.../local--files/start/Screenshot-Ph...
> (the perspective and reflection is produced by Phatch itself)
>
> Phatch has many features, like:
> - EXIF information inspector with thumbnail
> - limit jpeg file size when saving
> - tons of actions organized by tags (including perspective, round
> corners, shadow, reflection, ...)
> - console version (Phatch can now run without a gui on servers)
> - batch rename and copy files based on exif metadata
> - data stamping (http://photobatch.w...)
> - online documentation wiki (http://photobatch.w...)
>
> Linux only features:
> - desktop or panel droplets on which images or folders can be dropped
> (will be ported to Windows & Mac)
> - Nautilus and desktop integration (with its own mime type and
> nautilus extension)
> - manpage with examples
>
> With python-pyexiv2 the following featues are added:
> - embedding the original EXIF and IPTC tags in the image
>
> All actions mostly have a separate pil function in their source code,
> so they could be read as a recipe book for PIL:
> * Auto Contrast - Maximize image contrast
> * Background - Put colour under transparent image
> * Border - Crop or add border to all sides
> * Brightness - Adjust brightness from black to white
> * Canvas - Crop the image or enlarge canvas without resizing the image
> * Colorize - Colorize grayscale image
> * Common - Copies the most common pixel value
> * Contrast - Adjust from grey to black & white
> * Convert Mode - Convert the color mode of an image (grayscale, RGB,
> RGBA or CMYK)
> * Copy - Copy image file
> * Effect - Blur, Sharpen, Emboss, Smooth, ...
> * Equalize - Equalize the image histogram
> * Fit - Downsize and crop image with fixed ratio
> * Grayscale - Fade all colours to gray
> * Invert - Invert the colors of the image (negative)
> * Maximum - Copies the maximum pixel value
> * Mask - Apply a transparency mask
> * Median - Copies the median pixel value
> * Minimum - Copies the minimum pixel value
> * Offset - Offset by distance and wrap around
> * Posterize - Reduce the number of bits of colour channel
> * Perspective - Shear 2d or 3d
> * Rank - Copies the rank'th pixel value
> * Reflect - Drops a reflection
> * Rename - Rename image file
> * Rotate - Rotate with random angle
> * Round - Round or crossed corners with variable radius and corners
> * Saturation - Adjust saturation from grayscale to high
> * Save - Save an image with variable compression in different types
> * Scale - Scale an image with different resample filters.
> * Shadow - Drop a blurred shadow under a photo with variable position,
> blur and color
> * Solarize - Invert all pixel values above threshold
> * Text - Write text at a given position
> * Transpose - Flip or rotate an image by 90 degrees
> * Watermark - Apply a watermark image with variable placement (offset,
> scaling, tiling) and opacity
>
> I develop Phatch on Ubuntu/Linux, but I have tested and polished it
> regularly on Windows and Mac Os X. (Only the droplet functionality
> needs to be ported.) Phatch is submitted to Debian unstable and
> Ubuntu Hardy. Packagers for other platforms are welcome.
>
> Requirements:
> - PIL 1.1.5 or higher
> - wxPython 2.6 or higher
> - pyexiv2 (optional)
> - python nautilus bindings (optional)


This is pretty cool! I have one question about the equally cool
website: what tool did you use for creating this image:

http://photobatch.w.../local--files/start/Screenshot-Ph...


Cheers,
Daniel

spe.stani.be

2/19/2008 9:54:00 AM

0

On Feb 19, 4:23 am, "Daniel Fetchinson" <fetchin...@googlemail.com>
wrote:
> On 2/18/08, SPE - Stani's Python Editor <spe.stani...@gmail.com> wrote:
> > I'm pleased to announce the release of Phatch which is a
> > powerful batch processor and renamer. Phatch exposes a big part of the
> > Python Imaging Library through an user friendly GUI. (It is using
> > python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch
> > is not targeted at manipulating individual pictures (such as with
> > Gimp), but repeating the same actions on hundreds or thousands of
> > images.
>
> > If you know PIL and have some nice recipes laying around, it is very
> > easy to write plugins as Phatch generates the corresponding GUI
> > automagically just like in Django. Any existings PIL scripts can be
> > added very easily. Let me know if you want to contribute or have any
> > questions.
>
> > Homepage:http://photobatc...(free download link below)
> > Tutorials:http://photobatch.wikidot.com...
> > Translations:https://translations.launchpad.net/phatch/trunk/+p...
> > License: GPLv3
> > Screenshot:
> >http://photobatch.wikidot.com/local--files/start/Screenshot-Ph...
> > (the perspective and reflection is produced by Phatch itself)

> This is pretty cool! I have one question about the equally cool
> website: what tool did you use for creating this image:
>
> http://photobatch.wikidot.com/local--files/start/Screenshot-Ph...
This is Phatchs own dogfood. I guess you missed the tutorials link.
There is a tutorial how you can achieve this effect:
http://photobatch.wikidot.com/tutorial-round-...

I run Phatch on three screenshots I have to put them in perspective
with rounded corners and perspective. I let Phatch save them as a png
so transparency is preserved. Afterwards I opened Gimp and put the
three together on the background of a radial gradient.

Let me know if it works for you.

Stani

Steve Holden

2/19/2008 12:20:00 PM

0

SPE - Stani's Python Editor wrote:
> I'm pleased to announce the release of Phatch which is a
> powerful batch processor and renamer. Phatch exposes a big part of the
> Python Imaging Library through an user friendly GUI. (It is using
> python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch
> is not targeted at manipulating individual pictures (such as with
> Gimp), but repeating the same actions on hundreds or thousands of
> images.
>
Perhaps you could put a link to the source on the Windows instalL page?
I don't mind being a second-class citizen, but it's annoying to have to
jump around like that.

Looks like a nice piece of work.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.hold...

Steve Holden

2/19/2008 12:20:00 PM

0

SPE - Stani's Python Editor wrote:
> I'm pleased to announce the release of Phatch which is a
> powerful batch processor and renamer. Phatch exposes a big part of the
> Python Imaging Library through an user friendly GUI. (It is using
> python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch
> is not targeted at manipulating individual pictures (such as with
> Gimp), but repeating the same actions on hundreds or thousands of
> images.
>
Perhaps you could put a link to the source on the Windows instalL page?
I don't mind being a second-class citizen, but it's annoying to have to
jump around like that.

Looks like a nice piece of work.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.hold...

Fred Pacquier

2/19/2008 5:41:00 PM

0

Steve Holden <steve@holdenweb.com> said :

> Perhaps you could put a link to the source on the Windows instalL page?
> I don't mind being a second-class citizen, but it's annoying to have to
> jump around like that.

I'm interested too, and was also wondering if Phatch is as full-featured
unders Windows as under Linux, specifically the EXIF/IPTC functions made
available through pyexiv2 : exiv2 itself seems to discriminate between the
two, the Windows package only has the executable, not the library.

--
YAFAP : http://www.multimania....

Daniel Fetchinson

2/19/2008 6:09:00 PM

0

> > > I'm pleased to announce the release of Phatch which is a
> > > powerful batch processor and renamer. Phatch exposes a big part of the
> > > Python Imaging Library through an user friendly GUI. (It is using
> > > python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch
> > > is not targeted at manipulating individual pictures (such as with
> > > Gimp), but repeating the same actions on hundreds or thousands of
> > > images.
> >
> > > If you know PIL and have some nice recipes laying around, it is very
> > > easy to write plugins as Phatch generates the corresponding GUI
> > > automagically just like in Django. Any existings PIL scripts can be
> > > added very easily. Let me know if you want to contribute or have any
> > > questions.
> >
> > > Homepage:http://photobatc...(free download link below)
> > > Tutorials:http://photobatch.wikidot.com...
> > >
> Translations:https://translations.launchpad.net/phatch/trunk/+p...
> > > License: GPLv3
> > > Screenshot:
> > >http://photobatch.wikidot.com/local--files/start/Screenshot-Ph...
> > > (the perspective and reflection is produced by Phatch itself)
>
> > This is pretty cool! I have one question about the equally cool
> > website: what tool did you use for creating this image:
> >
> > http://photobatch.wikidot.com/local--files/start/Screenshot-Ph...
> This is Phatchs own dogfood. I guess you missed the tutorials link.
> There is a tutorial how you can achieve this effect:
> http://photobatch.wikidot.com/tutorial-round-...
>
> I run Phatch on three screenshots I have to put them in perspective
> with rounded corners and perspective. I let Phatch save them as a png
> so transparency is preserved. Afterwards I opened Gimp and put the
> three together on the background of a radial gradient.
>
> Let me know if it works for you.

Yep, I indeed missed the tutorial :)
Now it's clear, thanks a lot!

Cheers,
Daniel

Wolfgang Strobl

2/19/2008 8:51:00 PM

0

"SPE - Stani's Python Editor" <spe.stani.be@gmail.com>:

>I develop Phatch on Ubuntu/Linux, but I have tested and polished it
>regularly on Windows and Mac Os X. (Only the droplet functionality
>needs to be ported.) Phatch is submitted to Debian unstable and
>Ubuntu Hardy. Packagers for other platforms are welcome.
>
>Requirements:
>- PIL 1.1.5 or higher
>- wxPython 2.6 or higher
>- pyexiv2 (optional)
>- python nautilus bindings (optional)

Hm. I just gave it a try on Windows, but in vain. See below.

C:\build\phatch-0.1.bzr385>python setup.py install

just says

Sorry your platform is not yet supported.

>>> from PIL import Image
>>> Image.VERSION
'1.1.5'
>>> import wx
>>> wx.__version__
'2.8.7.1'

By greping for "Sorry you platform", I found config.py and there
(abbreviated) the following function:

def check_config_paths(config_paths):
if config_paths: return config_paths
p = sys.prefix
if sys.platform[:5] == 'linux':
return {
"PHATCH_IMAGE_PATH" :
...
}
else:
sys.stderr.write('Sorry your platform is not yet supported.\n')
sys.exit()

How is this supposed to work on Windows?

--
Wir danken für die Beachtung aller Sicherheitsbestimmungen

Steve Holden

2/19/2008 10:05:00 PM

0

Wolfgang Strobl wrote:
> "SPE - Stani's Python Editor" <spe.stani.be@gmail.com>:
>
>> I develop Phatch on Ubuntu/Linux, but I have tested and polished it
>> regularly on Windows and Mac Os X. (Only the droplet functionality
>> needs to be ported.) Phatch is submitted to Debian unstable and
>> Ubuntu Hardy. Packagers for other platforms are welcome.
>>
>> Requirements:
>> - PIL 1.1.5 or higher
>> - wxPython 2.6 or higher
>> - pyexiv2 (optional)
>> - python nautilus bindings (optional)
>
> Hm. I just gave it a try on Windows, but in vain. See below.
>
> C:\build\phatch-0.1.bzr385>python setup.py install
>
> just says
>
> Sorry your platform is not yet supported.
>
>>>> from PIL import Image
>>>> Image.VERSION
> '1.1.5'
>>>> import wx
>>>> wx.__version__
> '2.8.7.1'
>
> By greping for "Sorry you platform", I found config.py and there
> (abbreviated) the following function:
>
> def check_config_paths(config_paths):
> if config_paths: return config_paths
> p = sys.prefix
> if sys.platform[:5] == 'linux':
> return {
> "PHATCH_IMAGE_PATH" :
> ...
> }
> else:
> sys.stderr.write('Sorry your platform is not yet supported.\n')
> sys.exit()
>
> How is this supposed to work on Windows?
>
RTFM: the web site instructions clearly state that setup.py doesn't
currently work with Windows. You should be able to double-click on the
program in Explorer, or use any of the standard ways of creating a link
shortcut.

regards
Steve

--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.hold...

Wolfgang Strobl

2/20/2008 1:28:00 AM

0

Steve Holden <steve@holdenweb.com> wrote:

>RTFM: the web site instructions clearly state that setup.py doesn't
>currently work with Windows.

Do they? http://photobatch... doesn't, following "documentation"
http://photobatch... doesn't, either. I missed "start phatch in
trunk/phatch" while browsing through the web site, though. Not finding
any specific instructions in README and finding no INSTALL at all, I
expected setup.py to work on any platform.

>You should be able to double-click on the
>program in Explorer, or use any of the standard ways of creating a link
>shortcut.

Just starting phatch.py in phatch, as documented, does it, too. Thanks!


--
Wir danken für die Beachtung aller Sicherheitsbestimmungen

Steve Holden

2/20/2008 2:18:00 AM

0

Wolfgang Strobl wrote:
> Steve Holden <steve@holdenweb.com> wrote:
>
>> RTFM: the web site instructions clearly state that setup.py doesn't
>> currently work with Windows.
>
> Do they? http://photobatch... doesn't, following "documentation"
> http://photobatch... doesn't, either. I missed "start phatch in
> trunk/phatch" while browsing through the web site, though. Not finding
> any specific instructions in README and finding no INSTALL at all, I
> expected setup.py to work on any platform.
>
>> You should be able to double-click on the
>> program in Explorer, or use any of the standard ways of creating a link
>> shortcut.
>
> Just starting phatch.py in phatch, as documented, does it, too. Thanks!
>
>
Pardon me for reading the install instructions :) -- from
http://photobatch.wikidot.c...:

Windows

Requirements

Install first Python (2.5 or 2.4), wxPython (2.8 or 2.6) and Python
Imaging Library (1.1.6 or 1.1.5).
Installation

Fetch the tar.gz source package from the phatch download page. Unzip the
downloaded file. Do not run "python setup.py install", as this is only
supported for linux! Start Phatch in trunk/phatch with:

python phatch.py
"""

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.hold...