You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.11/site-packages/fitz/__init__.py", line 9841, in invert_irect
r = JM_irect_from_py(bbox)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/fitz/__init__.py", line 16270, in JM_irect_from_py
ret = mupdf.fz_make_irect(r.x0, r.y0, r.x1, r.y1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mupdf/__init__.py", line 39687, in fz_make_irect
return _mupdf.fz_make_irect(x0, y0, x1, y1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: in method 'fz_make_irect', argument 1 of type 'int'
How to reproduce the bug
>>> import fitz
>>> pix = fitz.Pixmap("screenshot.png")
>>> rect = fitz.Rect(0, 0, 100, 100)
>>> pix.invert_irect(rect)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.11/site-packages/fitz/__init__.py", line 9841, in invert_irect
r = JM_irect_from_py(bbox)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/fitz/__init__.py", line 16270, in JM_irect_from_py
ret = mupdf.fz_make_irect(r.x0, r.y0, r.x1, r.y1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mupdf/__init__.py", line 39687, in fz_make_irect
return _mupdf.fz_make_irect(x0, y0, x1, y1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: in method 'fz_make_irect', argument 1 of type 'int'
>>> fitz.version
('1.23.23', '1.23.10', '20240218000001')
>>>
Are the above usages not allowed now? I try below is work normal.
>>> pix.invert_irect([0, 0, 100, 100])
True
>>>
PyMuPDF version
1.23.23
Operating system
Linux
Python version
3.11
The text was updated successfully, but these errors were encountered:
Description of the bug
Pixmap.invert_irect
How to reproduce the bug
Are the above usages not allowed now? I try below is work normal.
PyMuPDF version
1.23.23
Operating system
Linux
Python version
3.11
The text was updated successfully, but these errors were encountered: