New image and color management library for Python 2+3

Christian Heimes lists at cheimes.de
Mon Aug 20 13:34:31 EDT 2012


Am 19.08.2012 19:35, schrieb Jan Riechers:
> I'm sorry for getting out of your initial question/request, but did you
> try out ImageMagick before making use of FreeImage - do you even perhaps
> can deliver a comparison between your project and ImageMagick (if
> regular Python is used)?
> 
> I ask cause:
> Im in the process of creating a web-app which also requires image
> processing and just switching from PIL (because it is unfortunately not
> that quick as it should be) to ImageMagick and the speeds are much
> better compared to it, but I didn't take measurements of that.

Hello Jan,

we decided against ImageMagick and pgmagick for several reasons. For one
we were already using FreeImage in other projects (Delphi projects and
through ctypes binding with FreeImagePy).

Also FreeImage is much easier to install and deploy than ImageMagick,
Boost and all its dependencies. We are deploying our software on several
systems (Windows, Linux) and some of the Linux servers have old
enterprise distributions (RHEL 4 just went out of commission). In order
to support all platforms and to get reliable libraries we have to
install every dependency in our own environment.

The Python bindings for ImageMagick weren't that good and today they are
still buggy. For example I'm not able to set the resize filter to a high
quality setting like Catmull-Rom-Spline with the most recent version of
pgmagick. filterType() doesn't do anything. The output image still has
the same MD5 hash.

ImageMagick and PIL were missing important features, too. For example
both libraries don't support color management with lcms2 nor cached
color transformations nor introspection of ICC profiles. They use lcms1.


> Can you perhaps test your solution with ImageMagick (as it is used
> widely) it would be interesting so. :)

I've added some more benchmark results to the README.txt (PIL with
non-standard libjpeg-turbo and pgmagick). The results are available at
https://bitbucket.org/tiran/smc.freeimage

Spoiler: pgmagick isn't faster and its resize filter settings don't work.

Christian




More information about the Python-list mailing list