Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: How to identify different image file formats

Python: How to identify different image file formats
{filelink=16364}

mport imghdr
file="photo.jpg"
result = imghdr.what(file)
if result:
    print "file format:", result
else:
    print "cannot identify file", file

Users who found this page were searching for:

  • python compare strings
  • calculate number of day in perl
  • python get cookie
  • python getelementsbytype
  • java hasmap generic class
  • remove all java

No comments yet.

Leave a Comment