Picture resolution and PIL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johny

    #1

    Picture resolution and PIL

    Is it possible to find out a picture resolution by using PIL package?
    Thanks for help
    L.

  • kyosohma@gmail.com

    #2
    Re: Picture resolution and PIL

    On Apr 6, 1:16 pm, "Johny" <pyt...@hope.cz wrote:
    Is it possible to find out a picture resolution by using PIL package?
    Thanks for help
    L.
    Dunno. But I found some ways to read metadata that should give you the
    info in most cases:

    http://snippets.dzone.com/posts/show/768
    JAGO33 adalah web terpercaya nomor 1 di Indonesia dan pasti aman.


    Hope that helps,

    Mike

    Comment

    • bearophileHUGS@lycos.com

      #3
      Re: Picture resolution and PIL

      Johny:
      Is it possible to find out a picture resolution by using PIL package
      By Gian Mario Tagliaretti:
      import PIL.Image
      a = PIL.Image.open( "foo.jpg")
      a.info["dpi"]
      (72, 72)

      (It may raise an exception if that information isn't available)
      I don't know if that can be used to read the DPI tag inside a TIFF
      image.
      You can also read the pixel size of any image.

      Bye,
      bearophile

      Comment

      Working...