Delete the image referred to by xef. Actually replaces by a small transparent Pixmap using method Page.replace_image. Args: xref: xref of the image to delete.
(page: 'Page', xref: int)
| 10890 | return val |
| 10891 | |
| 10892 | def delete_image(page: 'Page', xref: int): |
| 10893 | """Delete the image referred to by xef. |
| 10894 | |
| 10895 | Actually replaces by a small transparent Pixmap using method Page.replace_image. |
| 10896 | |
| 10897 | Args: |
| 10898 | xref: xref of the image to delete. |
| 10899 | """ |
| 10900 | # make a small 100% transparent pixmap (of just any dimension) |
| 10901 | pix = Pixmap(csGRAY, (0, 0, 1, 1), 1) |
| 10902 | pix.clear_with() # clear all samples bytes to 0x00 |
| 10903 | page.replace_image(xref, pixmap=pix) |
| 10904 | |
| 10905 | def delete_link(self, linkdict): |
| 10906 | """Delete a Link.""" |