JM_pixmap_from_display_list > Assertion Error : Checking for wrong type (original) (raw)
Description of the bug
in the JM_pixmap_from_display_list function, there is an assertion statement checking if cs is of type Colourspace. It should be checking for fitz.mupdf.FzColorspace.
Current code:
assert isinstance( cs, Colorspace)
Fix:
assert isinstance( cs, fitz.mupdf.FzColorspace)
How to reproduce the bug
Write a function that uses get_pixmap from a fix fitz file object created from reading a pdf file.
Assert error will appear.
PyMuPDF version
1.23.13
Operating system
Windows
Python version
3.11