'Generate a (chunk_type, chunk_offset) 2-tuple for each of the chunks
in the PNG image stream. Iteration stops after the IEND chunk is
returned.'

def _iter_chunk_offsets(self):

    chunk_offset = 8
    while True:
        chunk_data_len = self._stream_rdr.read_long(chunk_offset)
        chunk_type = self._stream_rdr.read_str(4, chunk_offset, 4)
        data_offset = (chunk_offset + 8)
        (yield (chunk_type, data_offset))
        if (chunk_type == 'IEND'):
            break
        chunk_offset += (((4 + 4) + chunk_data_len) + 4)
