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)
| 275 | |
| 276 | |
| 277 | def delete_image(page: Page, xref: int): |
| 278 | """Delete the image referred to by xef. |
| 279 | |
| 280 | Actually replaces by a small transparent Pixmap using method Page.replace_image. |
| 281 | |
| 282 | Args: |
| 283 | xref: xref of the image to delete. |
| 284 | """ |
| 285 | # make a small 100% transparent pixmap (of just any dimension) |
| 286 | pix = fitz_old.Pixmap(fitz_old.csGRAY, (0, 0, 1, 1), 1) |
| 287 | pix.clear_with() # clear all samples bytes to 0x00 |
| 288 | page.replace_image(xref, pixmap=pix) |
| 289 | |
| 290 | |
| 291 | def insert_image(page, rect, **kwargs): |
nothing calls this directly
no test coverage detected
searching dependent graphs…