def write(self, fptr):
fptr.write(struct.pack('<STR_LIT>', <NUM_LIT>, b'<STR_LIT>'))<EOL>bit_depth_signedness = <NUM_LIT> if self.signed else <NUM_LIT><EOL>bit_depth_signedness |= self.bits_per_component - <NUM_LIT:1><EOL>read_buffer = struct.pack('<STR_LIT>',<EOL>self.height,<EOL>self.width,<EOL>self.num_components,<EOL>bit_depth_signedness,<EOL>self.compression,<EOL><NUM_LIT:1> if self.colorspace_unknown else <NUM_LIT:0>,<EOL><NUM_LIT:1> if self.ip_provided else <NUM_LIT:0>)<EOL>fptr.write(read_buffer)<EOL>
Write an Image Header box to file.