[Tutor] images

John Fouhy john at fouhy.net
Mon Nov 5 02:25:29 CET 2007


On 05/11/2007, SwartMumba snake <swartmumba at yahoo.com> wrote:
> Hi
>
> I would like to know which is the best module to use, with regard to my
> needs:
>
> - I would like to read an image off a website
> e.g. http://www.examplecom/image/1/PNG/
>
> - I would then like to read the pixels and do other things to the image

For manipulating the image, your best bet is probably PIL (the Python
Image Library).

To get the image, if you know its URL, you can just use urllib or
urllib2 (in the standard library).  If you will need to do some
parsing to figure out what image you want, you could look into
BeautifulSoup.

HTH.

-- 
John.


More information about the Tutor mailing list