mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-20 12:14:46 +03:00
Corrections applied:
- Image.show() method is no longer supporting **title** option, corresponding docs were updated; - XDGViewer is moved to the end of the viewers queue, this viewer will be utilized when all the previous viewers failed to open the image; - Documentation of xvViewer has been updated; - The tests that were opening images in viewers were disabled. Reason: due to implementation a program or a test will not terminate till the image in the viewer is explicitly closed.
This commit is contained in:
parent
81d2becfc4
commit
9f64a2f29c
|
@ -27,8 +27,7 @@ if os.environ.get("SHOW_ERRORS", None):
|
||||||
class test_image_results:
|
class test_image_results:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def upload(a, b):
|
def upload(a, b):
|
||||||
a.show()
|
return None
|
||||||
b.show()
|
|
||||||
|
|
||||||
elif "GITHUB_ACTIONS" in os.environ:
|
elif "GITHUB_ACTIONS" in os.environ:
|
||||||
HAS_UPLOADER = True
|
HAS_UPLOADER = True
|
||||||
|
|
|
@ -41,9 +41,12 @@ def test_viewer_show(order):
|
||||||
ImageShow._viewers.pop(0)
|
ImageShow._viewers.pop(0)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(
|
@pytest.mark.skip(
|
||||||
not on_ci() or is_win32(),
|
reason=(
|
||||||
reason="Only run on CIs; hangs on Windows CIs",
|
"Due to implementation of Unix and Windows viewers",
|
||||||
|
"a program or a test relying on the viewer will not terminate",
|
||||||
|
"till the image is explicitly closed",
|
||||||
|
)
|
||||||
)
|
)
|
||||||
def test_show():
|
def test_show():
|
||||||
for mode in ("1", "I;16", "LA", "RGB", "RGBA"):
|
for mode in ("1", "I;16", "LA", "RGB", "RGBA"):
|
||||||
|
|
|
@ -2269,14 +2269,16 @@ class Image:
|
||||||
The image is first saved to a temporary file. By default, it will be in
|
The image is first saved to a temporary file. By default, it will be in
|
||||||
PNG format.
|
PNG format.
|
||||||
|
|
||||||
On Unix, the image is then opened using the **display**, **eog** or
|
On Unix, the image is then opened using the **display**, **gm**, **eog**,
|
||||||
**xv** utility, depending on which one can be found.
|
or **xv** utility. Finally, if all the viewers failed, the attempt is made
|
||||||
|
to open the image file using **xdg-open** command,
|
||||||
|
this command uses the default system image viewer.
|
||||||
|
|
||||||
On macOS, the image is opened with the native Preview application.
|
On macOS, the image is opened with the native Preview application.
|
||||||
|
|
||||||
On Windows, the image is opened with the standard PNG display utility.
|
On Windows, the image is opened with the standard PNG display utility.
|
||||||
|
|
||||||
:param title: Optional title to use for the image window, where possible.
|
:param title: has been deprecated
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_show(self, title=title)
|
_show(self, title=title)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user