Re: Digital Number

Fredrik Lundh <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
On Sun, Sep 19, 2010 at 12:19 PM,  <[email protected]> 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  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.