Skip to content

Commit

Permalink
magic number for jpg
Browse files Browse the repository at this point in the history
Magic number for some jpeg could be 29486  0x732E
fix issue [Moustikitos#6](Moustikitos#6)
  • Loading branch information
s-leger committed Jul 25, 2016
1 parent 8a37040 commit ae00704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tyf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def __init__(self, fileobj):
byteorder = "<" if first == 0x4949 else ">"

magic_number, = unpack(byteorder+"H", fileobj)
if magic_number != 0x2A: # 42
if magic_number not in [0x732E,0x2A]: #29486, 42
fileobj.close()
if magic_number == 0x2B: # 43
raise IOError("BigTIFF file not supported")
Expand Down

0 comments on commit ae00704

Please sign in to comment.