def test_dpx(h, f): """DPX (Digital Picture Exchange)""" import struct if len(h) < 1664: return None if h[:4]=="SDPX": endianess = '>' elif h[:4]=="XPDS": endianess = '<' else: return None raw_info = struct.unpack(endianess+"hll", h[770:780]) if 00 and raw_info[2]>0: return 'dpx' tests.append(test_dpx) def test_cin(h, f): """Kodak Cineon for digital film images""" import struct if len(h) < 508 or h[:4]!='\x80\x2A\x5F\xD7' or not 0ll", h[99:107]) if raw_info[0]>0 and raw_info[1]>0: return 'cin' tests.append(test_cin)