Skip to content
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

Topmost pixels of Big PNG object gets black using insert_image() function #4128

Open
LasseStaeglichPP opened this issue Dec 9, 2024 · 0 comments

Comments

@LasseStaeglichPP
Copy link

Description of the bug

When using PyMuPDF's insert_image function to insert a transparent PNG into a PDF, certain areas of the image (notably the topmost pixels) appear as solid black in the generated PDF. This issue is most noticeable in large PNG images (~300 DPI, dimensions such as 56 cm x 100 cm)
I tried the insert_image() function with the Image parameter as a File, Pixmap and stream. All had the same result

Here the resulting PDF file:
23511_1_No.pdf
Screenshot of the PNG wihtout the issue
image
Screenshot of the PDF with the issue
image

The PNG was sadly to big for uploading so i here is a wetransfer link:
https://we.tl/t-1VdSrVImwP

How to reproduce the bug

use insert_image() function with a large PNG with transparency and semi transparency

PyMuPDF version

1.24.12

Operating system

Windows

Python version

3.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant