Fix up symlinks in exif bump
Previous exif bump copied the newer version into mediagoblin/tools/extlib/exif but not in extlib/exif. Fix this by bumping extlib/exif and symlinking to tools/extlib/exif. Do note that this is still the version fetched from http://sourceforge.net/projects/exif-py/ while the upstream maintainer seems to be active on: https://github.com/ianare/exif-py (The sf.net download is quite new though) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
71717fd531
commit
ab7281fe24
@ -4,7 +4,7 @@
|
||||
# Library to extract EXIF information from digital camera image files
|
||||
# http://sourceforge.net/projects/exif-py/
|
||||
#
|
||||
# VERSION 1.1.0
|
||||
# VERSION 1.0.10
|
||||
#
|
||||
# To use this library call with:
|
||||
# f = open(path_name, 'rb')
|
||||
@ -171,9 +171,9 @@ EXIF_TAGS = {
|
||||
3: 'Rotated 180',
|
||||
4: 'Mirrored vertical',
|
||||
5: 'Mirrored horizontal then rotated 90 CCW',
|
||||
6: 'Rotated 90 CW',
|
||||
6: 'Rotated 90 CCW',
|
||||
7: 'Mirrored horizontal then rotated 90 CW',
|
||||
8: 'Rotated 90 CCW'}),
|
||||
8: 'Rotated 90 CW'}),
|
||||
0x0115: ('SamplesPerPixel', ),
|
||||
0x0116: ('RowsPerStrip', ),
|
||||
0x0117: ('StripByteCounts', ),
|
||||
@ -251,40 +251,54 @@ EXIF_TAGS = {
|
||||
2: 'CenterWeightedAverage',
|
||||
3: 'Spot',
|
||||
4: 'MultiSpot',
|
||||
5: 'Pattern'}),
|
||||
5: 'Pattern',
|
||||
6: 'Partial',
|
||||
255: 'other'}),
|
||||
0x9208: ('LightSource',
|
||||
{0: 'Unknown',
|
||||
1: 'Daylight',
|
||||
2: 'Fluorescent',
|
||||
3: 'Tungsten',
|
||||
9: 'Fine Weather',
|
||||
10: 'Flash',
|
||||
3: 'Tungsten (incandescent light)',
|
||||
4: 'Flash',
|
||||
9: 'Fine weather',
|
||||
10: 'Cloudy weather',
|
||||
11: 'Shade',
|
||||
12: 'Daylight Fluorescent',
|
||||
13: 'Day White Fluorescent',
|
||||
14: 'Cool White Fluorescent',
|
||||
15: 'White Fluorescent',
|
||||
17: 'Standard Light A',
|
||||
18: 'Standard Light B',
|
||||
19: 'Standard Light C',
|
||||
12: 'Daylight fluorescent (D 5700 - 7100K)',
|
||||
13: 'Day white fluorescent (N 4600 - 5400K)',
|
||||
14: 'Cool white fluorescent (W 3900 - 4500K)',
|
||||
15: 'White fluorescent (WW 3200 - 3700K)',
|
||||
17: 'Standard light A',
|
||||
18: 'Standard light B',
|
||||
19: 'Standard light C',
|
||||
20: 'D55',
|
||||
21: 'D65',
|
||||
22: 'D75',
|
||||
255: 'Other'}),
|
||||
23: 'D50',
|
||||
24: 'ISO studio tungsten',
|
||||
255: 'other light source',}),
|
||||
0x9209: ('Flash',
|
||||
{0: 'No',
|
||||
1: 'Fired',
|
||||
5: 'Fired (?)', # no return sensed
|
||||
7: 'Fired (!)', # return sensed
|
||||
9: 'Fill Fired',
|
||||
13: 'Fill Fired (?)',
|
||||
15: 'Fill Fired (!)',
|
||||
16: 'Off',
|
||||
24: 'Auto Off',
|
||||
25: 'Auto Fired',
|
||||
29: 'Auto Fired (?)',
|
||||
31: 'Auto Fired (!)',
|
||||
32: 'Not Available'}),
|
||||
{0: 'Flash did not fire',
|
||||
1: 'Flash fired',
|
||||
5: 'Strobe return light not detected',
|
||||
7: 'Strobe return light detected',
|
||||
9: 'Flash fired, compulsory flash mode',
|
||||
13: 'Flash fired, compulsory flash mode, return light not detected',
|
||||
15: 'Flash fired, compulsory flash mode, return light detected',
|
||||
16: 'Flash did not fire, compulsory flash mode',
|
||||
24: 'Flash did not fire, auto mode',
|
||||
25: 'Flash fired, auto mode',
|
||||
29: 'Flash fired, auto mode, return light not detected',
|
||||
31: 'Flash fired, auto mode, return light detected',
|
||||
32: 'No flash function',
|
||||
65: 'Flash fired, red-eye reduction mode',
|
||||
69: 'Flash fired, red-eye reduction mode, return light not detected',
|
||||
71: 'Flash fired, red-eye reduction mode, return light detected',
|
||||
73: 'Flash fired, compulsory flash mode, red-eye reduction mode',
|
||||
77: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected',
|
||||
79: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected',
|
||||
89: 'Flash fired, auto mode, red-eye reduction mode',
|
||||
93: 'Flash fired, auto mode, return light not detected, red-eye reduction mode',
|
||||
95: 'Flash fired, auto mode, return light detected, red-eye reduction mode'}),
|
||||
0x920A: ('FocalLength', ),
|
||||
0x9214: ('SubjectArea', ),
|
||||
0x927C: ('MakerNote', ),
|
||||
@ -410,7 +424,10 @@ GPS_TAGS = {
|
||||
0x0018: ('GPSDestBearing', ),
|
||||
0x0019: ('GPSDestDistanceRef', ),
|
||||
0x001A: ('GPSDestDistance', ),
|
||||
0x001B: ('GPSProcessingMethod', ),
|
||||
0x001C: ('GPSAreaInformation', ),
|
||||
0x001D: ('GPSDate', ),
|
||||
0x001E: ('GPSDifferential', ),
|
||||
}
|
||||
|
||||
# Ignore these tags when quick processing
|
||||
@ -1283,7 +1300,11 @@ class EXIF_header:
|
||||
# return pointer to next IFD
|
||||
def next_IFD(self, ifd):
|
||||
entries=self.s2n(ifd, 2)
|
||||
return self.s2n(ifd+2+12*entries, 4)
|
||||
next_ifd = self.s2n(ifd+2+12*entries, 4)
|
||||
if next_ifd == ifd:
|
||||
return 0
|
||||
else:
|
||||
return next_ifd
|
||||
|
||||
# return list of IFDs in header
|
||||
def list_IFDs(self):
|
||||
@ -1567,7 +1588,8 @@ class EXIF_header:
|
||||
dict=MAKERNOTE_CANON_TAGS)
|
||||
for i in (('MakerNote Tag 0x0001', MAKERNOTE_CANON_TAG_0x001),
|
||||
('MakerNote Tag 0x0004', MAKERNOTE_CANON_TAG_0x004)):
|
||||
self.canon_decode_tag(self.tags[i[0]].values, i[1])
|
||||
if i[0] in self.tags:
|
||||
self.canon_decode_tag(self.tags[i[0]].values, i[1])
|
||||
return
|
||||
|
||||
|
||||
@ -1632,7 +1654,8 @@ def process_file(f, stop_tag='UNDEF', details=True, strict=False, debug=False):
|
||||
|
||||
# deal with the EXIF info we found
|
||||
if debug:
|
||||
print {'I': 'Intel', 'M': 'Motorola'}[endian], 'format'
|
||||
print "Endian format is ",endian
|
||||
print {'I': 'Intel', 'M': 'Motorola', '\x01':'Adobe Ducky', 'd':'XMP/Adobe unknown' }[endian], 'format'
|
||||
hdr = EXIF_header(f, endian, offset, fake_exif, strict, debug)
|
||||
ifd_list = hdr.list_IFDs()
|
||||
ctr = 0
|
||||
|
File diff suppressed because it is too large
Load Diff
1
mediagoblin/tools/extlib/EXIF.py
Symbolic link
1
mediagoblin/tools/extlib/EXIF.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../../extlib/exif/EXIF.py
|
Loading…
x
Reference in New Issue
Block a user