-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No images detected for PDF with a clear image #940
Comments
@mikethea1 thx for sharing the sample document, I'll look into that shortly |
@mikethea1 I had a look and you are correct, the image is inside the Pattern color. I think this is a bit of a corner case and it might not be beneficial to the library to include those. You can still extract them relatively easily though by implementing your own |
@mikethea1 I finally manage to find the time to do a proof of concept for what you are looking for. Please have a look at this branch https://github.com/BobLd/PdfPig/tree/issues/940 The logic might not be very straightforward. I'll give it a second look soon. For reference, the logic is based on my Skia pdf renderer. See here https://github.com/BobLd/PdfPig.Rendering.Skia/blob/f2456c0e2a1ea08e0befe1ac6695c23f39f8227e/UglyToad.PdfPig.Rendering.Skia/SkiaStreamProcessor.Shading.cs#L393 |
Nice! |
Here is the file of interest:
repro_p1.pdf
Clearly this file has an image yet pdfpg does not find it:
I dug into this a bit, and I believe the reason is that the image is being referenced via a "cs" operator (SetNonStrokeColorSpace) which references /Resources/Pattern and ultimately the image.
It would be cool if PdfPig could detect images referenced in this way!
The text was updated successfully, but these errors were encountered: