Lines Matching refs:_image
711 self._image = open(self.filename, 'r+b')
712 self._image.seek(0, os.SEEK_END)
713 self.image_size = self._image.tell()
715 self._image.seek(0, os.SEEK_SET)
716 header_bin = self._image.read(struct.calcsize(self.HEADER_FORMAT))
745 chunk_offset = self._image.tell()
747 header_bin = self._image.read(struct.calcsize(ImageChunk.FORMAT))
761 self._image.tell(),
763 self._image.seek(data_sz, os.SEEK_CUR)
769 fill_data = self._image.read(4)
790 self._image.read(4)
798 self._sparse_end = self._image.tell()
804 junk_len = len(self._image.read())
825 self._image.seek(self.NUM_CHUNKS_AND_BLOCKS_OFFSET, os.SEEK_SET)
826 self._image.write(struct.pack(self.NUM_CHUNKS_AND_BLOCKS_FORMAT,
841 self._image.seek(0, os.SEEK_END)
845 self._image.truncate(self._image.tell() + num_bytes)
853 self._image.seek(self._sparse_end, os.SEEK_SET)
854 self._image.write(struct.pack(ImageChunk.FORMAT,
872 self._image.seek(0, os.SEEK_END)
873 self._image.write(data)
881 self._image.seek(self._sparse_end, os.SEEK_SET)
882 self._image.write(struct.pack(ImageChunk.FORMAT,
888 self._image.write(data)
905 self._image.seek(0, os.SEEK_END)
906 self._image.write(fill_data * (size/4))
914 self._image.seek(self._sparse_end, os.SEEK_SET)
915 self._image.write(struct.pack(ImageChunk.FORMAT,
920 self._image.write(fill_data)
950 self._image.seek(self._file_pos)
951 data = self._image.read(size)
966 self._image.seek(chunk.input_offset + chunk_pos_offset)
967 data.extend(self._image.read(chunk_pos_to_go))
1003 self._image.truncate(size)
1037 self._image.seek(chunk.chunk_offset)
1038 self._image.write(struct.pack(ImageChunk.FORMAT,
1054 self._image.truncate(truncate_at)