(self)
| 30 | return vals |
| 31 | |
| 32 | def Find_Chunks(self): |
| 33 | |
| 34 | x=Chunk() |
| 35 | total=0 |
| 36 | while x.type != 'IEND': |
| 37 | x=Chunk() |
| 38 | x.Length=int(''.join(self.data[8+total:12+total]),16) |
| 39 | x.type=''.join(self.data[12+total:16+total]).decode('hex') |
| 40 | |
| 41 | x.data=''.join(self.data[16+total:15+x.Length+total]) |
| 42 | x.CRC=''.join(self.data[16+x.Length+total:20+x.Length+total]) |
| 43 | w=x.hight_width() |
| 44 | if w: |
| 45 | self.width=w[0] |
| 46 | self.hight=w[1] |
| 47 | self.Chunks.append(x) |
| 48 | |
| 49 | total=total+x.Length+12 |
| 50 | |
| 51 | |
| 52 | def __init__(self,file): |