Exemplo n.º 1
0
 def date_from_exif(self):
     file = open(self.filePath, 'rb')
     try:
         self.exif = EXIF.process_file(file, details=False, debug=False)
     except:
         ReportException()
         self.exif = {}
     file.close()
     date_str = self.exif.get('EXIF DateTimeOriginal', None)
     if date_str:
         date_str = str(date_str).lstrip("b'").strip("'")
         if MediaDateTime.DebugMode:
             Trace(date_str, self.filePath)
     return [ date_str, DateTime.to_struct_time(date_str) ]
Exemplo n.º 2
0
def processImage(image,schoolid):
  tags=EXIF.process_file(image)
  retdate=getDate(str(tags[tag]))
  return retdate