Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python imaging alternatives

I have python code that needs to do just a couple simple things to photographs: crop, resize, and overlay a watermark. I've used PIL, and the resample/resize results are TERRIBLE. I've used imagemagick, and the interface and commands were designed by packaging a cat in a box, and then repeatedly throwing it down a set of stairs at a keyboard.

I'm looking for something which is not PIL or Imagemagick that I can use with python to do simple, high-quality image transformations. For that matter, it doesn't even have to have python bindings if the command line interface is good.

Oh, and it needs to be relatively platform agnostic, our production servers are linux, but some of our devs develop on windows. It can't require the installation of a bunch of silly gui code to use as a library, either.

like image 730
Paul McMillan Avatar asked Sep 18 '09 00:09

Paul McMillan


People also ask

Is Python good for image processing?

Python is an excellent choice for these types of image processing tasks due to its growing popularity as a scientific programming language and the free availability of many state-of-the-art image processing tools in its ecosystem.

What can I use instead of PIL in Python?

Pillow is an image processing library forked from PIL (Python Image Library). Since PIL is no longer under development, Pillow is now widely used.

What is the best image processing library to use in Python?

OpenCV. OpenCV is one of the popular image processing tools for computer vision and image processing tasks for multiple different applications. It is an open-source Python library to process images and videos for face recognition, object identification, as well as human handwriting.


1 Answers

I've used PIL, and the resample/resize results are TERRIBLE.

Resizing in PIL was broken in many ways and PIL is not maintained for a long time. Starting from Pillow 2.7 most of the problems are fixed along with dramatically performance improvement. Make sure you are using latest Pillow.

like image 121
homm Avatar answered Nov 04 '22 18:11

homm