main.py
743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
Running test...
@author: chunk
chunkplus@gmail.com
2014 Dec
"""
import os, sys
import numpy as np
import StringIO
import pexif
__author__ = 'chunk'
if __name__ == '__main__':
# with open('res/bus_001.hog') as f:
# line = f.readline().split()
# line = np.array(line, dtype=np.float64)
# print line.shape
test_data = [
("data/jpeg/rose.jpg", "data/jpeg/rose.txt"),
("data/jpeg/conker.jpg", "data/jpeg/conker.txt"),
("data/jpeg/noexif.jpg", "data/jpeg/noexif.txt"),
]
jpeg = pexif.JpegFile.fromFile('data/jpeg/rose.jpg')
# out = StringIO.StringIO()
# with open('res/temp.txt','wb') as f:
# jpeg.dump(f)
# print out.getvalue()
print jpeg.get_exif()