We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
python3.9 pix.set_pixel(pos[0], pos[1], (255, 255, 255)) with the error
/lib/python3.9/site-packages/fitz/__init__.py", line 10131, in set_pixel c.append( ord(i))
The code is like this, has some wrong with python3.9, but it works with python3.7
pdf_file = fitz.open(input_pdf_path) for page_no, page in enumerate(pdf_file): zoom_x = 4.0 zoom_y = 4.0 matrix = fitz.Matrix(zoom_x, zoom_y) pix = page.get_pixmap(matrix=matrix) for pos in product(range(pix.width), range(pix.height)): if sum(pix.pixel(pos[0], pos[1])) >= 600: pix.set_pixel(pos[0], pos[1], (255, 255, 255))
1.23.12
MacOS
3.9
The text was updated successfully, but these errors were encountered:
Fix for Pixmap.set_pixel().
08d4cd3
Also added optimisation in src.extra.i. Addresses #3050.
Thanks for reporting this.
I have a fix in branch jules-3050. This is in review, and will hopefully be in a new release later today.
Sorry, something went wrong.
1eecf9c
Fixed in 1.23.15.
No branches or pull requests
Description of the bug
python3.9 pix.set_pixel(pos[0], pos[1], (255, 255, 255))
with the error
How to reproduce the bug
The code is like this, has some wrong with python3.9, but it works with python3.7
PyMuPDF version
1.23.12
Operating system
MacOS
Python version
3.9
The text was updated successfully, but these errors were encountered: