Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import struct
- instr = struct.Struct("HHHBBBx")
- outstr = struct.Struct("IIII")
- cnt = 0
- with open("sibenik.bin3", "rb") as infile:
- with open("sibenik.vxl", "wb") as outfile:
- infile.read(8)
- while infile:
- data = infile.read(instr.size)
- if not data: break
- (x,y,z,r,g,b) = instr.unpack(data)
- c = r*0x10000 + g*0x100 + b
- outfile.write(outstr.pack(x, y, z, c))
- cnt += 1
- print "->", cnt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement