This commit is contained in:
hugovk 2014-05-26 20:15:48 +03:00
parent 268c419d7c
commit 5f9cad1a8e

View File

@ -74,11 +74,9 @@ def isSpiderImage(filename):
fp = open(filename,'rb')
f = fp.read(92) # read 23 * 4 bytes
fp.close()
bigendian = 1
t = struct.unpack('>23f',f) # try big-endian first
hdrlen = isSpiderHeader(t)
if hdrlen == 0:
bigendian = 0
t = struct.unpack('<23f',f) # little-endian
hdrlen = isSpiderHeader(t)
return hdrlen