Full page image in digitized PDF #994
-
Hi everyone, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Scanned image pages usually have one (or more) images which cover the complete page - btw. not necessarily always being exactly the page size. img_list = [img for img in page.get_images(True) if img[-1] == 0] # only consider images directly called by page
for img in img_list:
bbox = page.get_image_bbox(img)
if page.rect in bbox:
# fully covering image detected!
break Comments: |
Beta Was this translation helpful? Give feedback.
Scanned image pages usually have one (or more) images which cover the complete page - btw. not necessarily always being exactly the page size.
There is a
Page
method that computes the rectangle an image covers on the page, the "bbox" (boundary box). You can iterate through a page's images and check whetherpage.rect in bbox
. Snippet:Comments:
get_images(True)
creates an extended image list, which also checks whether it is the page itself, t…