code: def init(self):
  		
  		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])
docs: Extract some info from chunks