On Sun, Sep 19, 2010 at 12:19 PM,  <majoris.ur...@yahoo.co.uk> wrote:

> How to read pixel wise Digital Number (DN) of a JPG image using PIL?

You mean "Digital Number" in the ancient GIS sense?  I.e. simply the
value of a pixel?

The simplest way is to use getpixel(pos) where pos is a (x, y) tuple:

   http://effbot.org/tag/PIL.Image.Image.getpixel

If you need to read more than a few pixels, calling load() to get an
access object is more efficient:

   http://effbot.org/tag/PIL.Image.Image.load

</F>
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to