用python读exif

Installtion

  1. download library
  2. extract it
  3. copy exif.py to Lib folder
  4. Some API demo source code can been found in comments sectio in exif.py

Demo

import
 EXIF
# extract thumbnail in Exif and save it
f = open ( "c:// p2.jpg" ,'rb' )
tags = EXIF.process_file ( f)
# save the thumbnail into a jpg format file
f = open ( "c:// a.jpg" ,'wb' )
f.write ( tags[ "JPEGThumbnail" ] )
f.close ( )

你可能感兴趣的:(python,import,download,library,Comments,tags)