def dump(self):
scan_lines = bytearray()<EOL>for y in range(self.height):<EOL><INDENT>scan_lines.append(<NUM_LIT:0>)  <EOL>scan_lines.extend(<EOL>self.canvas[(y * self.width * <NUM_LIT:4>):((y + <NUM_LIT:1>) * self.width * <NUM_LIT:4>)]<EOL>)<EOL><DEDENT>return SIGNATURE +self.pack_chunk(b'<STR_LIT>', struct.pack(b"<STR_LIT>",<EOL>self.width, self.height,<EOL><NUM_LIT:8>, <NUM_LIT:6>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>)) +self.pack_chunk(b'<STR_LIT>', zlib.compress(bytes(scan_lines), <NUM_LIT:9>)) +self.pack_chunk(b'<STR_LIT>', b'<STR_LIT>')<EOL>
Dump the image data