Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!prichard.zen.co.uk.POSTED!not-for-mail From: Nobody Subject: Re: Image processing to auto adjust colors in python ? Date: Mon, 16 May 2011 19:02:08 +0100 User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.python References: <4bb21cd6-6ece-4341-8231-18818e942ab3@y19g2000yqk.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 19 Organization: Zen Internet NNTP-Posting-Host: 6c659a45.news.zen.co.uk X-Trace: DXC=k_A6dK6OAE=QbE22cTG5i;0g@SS;SF6n7RiiCXJE[K>7l]GOjR>ESR0MinDf@i<0A8=m46 I'm processing thumbnails with python but one thing I need to do is to > auto-adjust an image for the "best" colors. I am using ffmpeg to get > thumbs three seconds into a video, sometimes the image is too dark. > Normally I'd go into something like the windows program Irfan View and > do "Auto Adjust Colors", but I need a comand-line solution to > processes hundreds of images in a loop. I'm using Ubuntu and Python. > Is there an image precessing package i could use to do this? PIL (Python Imaging Library) is the most widely-used general-purpose image library. For more advanced tasks, the usual solution is to use PIL to load/save images and do the processing with NumPy/SciPy (array-processing library). But you might want to check whether either ImageMagick (e.g. "convert -equalize ...") or NetPBM (e.g. pnmhisteq) do what you want. If they do, it will probably be the simplest solution.