-
Notifications
You must be signed in to change notification settings - Fork 556
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
1.23.9rc1: module 'fitz.mupdf' has no attribute 'fz_copy_pixmap_rect' #2978
Comments
Pretty far from a MWE, but the code that is triggering this is: # see https://pymupdf.readthedocs.io/en/latest/recipes-images.html#how-to-use-pixmaps-gluing-images
# get an image for each page - note fitz pages are 0-indexed.
pix_list = [doc[pg - 1].get_pixmap() for pg in sqs_obj.pages]
total_w = sum([X.width for X in pix_list])
max_h = max([X.height for X in pix_list])
# creage a dest image on which to tile these images - with given max height and total width.
soln_img = fitz.Pixmap(
pix_list[0].colorspace, (0, 0, total_w, max_h), pix_list[0].alpha
)
# concat the images together into the dest image.
starting_x = 0
for pix in pix_list:
pix.set_origin(starting_x, 0)
soln_img.copy(pix, pix.irect) # <--- exception here
starting_x += pix.width |
I checked and it does seem to be using the RC of
|
Thanks for this. Yes, you're quite right, it's missing from MuPDF's public API and thus breaking the rebased implementation. Am working on a fix now. |
This is fixed in release candidate 1.23.9rc2; see: #2996 |
Confirmed fixed at my end. Closing. |
Reopening until the fix is in a full release. |
Fixed in 1.23.9. |
Description of the bug
I tried the rebased fitz for the first time (sorry have been lax about following that). My test suite dies with this:
How to reproduce the bug
For now, its just this CI output:
https://gitlab.com/plom/plom/-/jobs/5863036742
If I get a chance later, I will try to narrow it down... but I thought it might be useful report first and track later.
PyMuPDF version
1.23.9rc1
Operating system
Linux
Python version
3.10
The text was updated successfully, but these errors were encountered: