<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init(self):
 		"""Extract some info from chunks"""

		for type_, data in self.chunks:
			if type_ == "IHDR":
				self.hdr = data
			elif type_ == "IEND":
				self.end = data
				
		if self.hdr:
			# grab w, h info
			self.width, self.height = struct.unpack("!II", self.hdr[8:16])