How to extract not original images but cropped images #3969
Unanswered
yuki-tashiro
asked this question in
Q&A
Replies: 2 comments 1 reply
-
This is no issue, but a typical Discussions item ... transferring. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This is not easy to achieve, because there is no definition of what "cropped" means. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Thank you for your great work on this project!
I would like to know how I can extract the cropped portion of images in a PDF, instead of the original, uncropped images.
Currently, I'm able to extract the original images using page.get_image_bbox(), but this doesn't account for images that are cropped on the page. What I need is to extract only the part of the image that is visible on the PDF page, excluding the portions that may have been cropped out.
Here’s my code along with the input PDF and the output images:
Here is my original pdf.
Extrated images
Ideal extracted images
Could you please guide me on how to modify the code to achieve this?
Thank you for your assistance!
Beta Was this translation helpful? Give feedback.
All reactions