| 832 | |
| 833 | @property |
| 834 | def text(self) -> dict[str, str | iTXt]: |
| 835 | # experimental |
| 836 | if self._text is None: |
| 837 | # iTxt, tEXt and zTXt chunks may appear at the end of the file |
| 838 | # So load the file to ensure that they are read |
| 839 | if self.is_animated: |
| 840 | frame = self.__frame |
| 841 | # for APNG, seek to the final frame before loading |
| 842 | self.seek(self.n_frames - 1) |
| 843 | self.load() |
| 844 | if self.is_animated: |
| 845 | self.seek(frame) |
| 846 | assert self._text is not None |
| 847 | return self._text |
| 848 | |
| 849 | def verify(self) -> None: |
| 850 | """Verify PNG file""" |