mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-06-28 19:26:14 +02:00
Porting code with 2to3 with some manual changes. The pillow modules is now required https://github.com/python-imaging/Pillow/
This commit is contained in:
parent
f629773772
commit
b3a4bdaf4b
10 changed files with 54 additions and 53 deletions
|
@ -177,20 +177,20 @@ class MinimalExifReader:
|
|||
if __name__ == '__main__':
|
||||
import sys
|
||||
if len(sys.argv) == 1:
|
||||
print "Pass jpgs to process."
|
||||
print("Pass jpgs to process.")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
for filename in sys.argv[1:]:
|
||||
try:
|
||||
f = MinimalExifReader(filename)
|
||||
print filename
|
||||
print "description: '%s'" % f.imageDescription()
|
||||
print "copyright: '%s'" % f.copyright()
|
||||
print "dateTimeOriginal: '%s'" % f.dateTimeOriginal()
|
||||
print "dateTimeOriginal: '%s'" % f.dateTimeOriginal('%B %d, %Y %I:%M:%S %p')
|
||||
print
|
||||
except ExifFormatException, ex:
|
||||
print(filename)
|
||||
print("description: '%s'" % f.imageDescription())
|
||||
print("copyright: '%s'" % f.copyright())
|
||||
print("dateTimeOriginal: '%s'" % f.dateTimeOriginal())
|
||||
print("dateTimeOriginal: '%s'" % f.dateTimeOriginal('%B %d, %Y %I:%M:%S %p'))
|
||||
print()
|
||||
except ExifFormatException as ex:
|
||||
sys.stderr.write("Exif format error: %s\n" % ex)
|
||||
except:
|
||||
sys.stderr.write("Unable to process %s\n" % filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue