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
Title not displayed when using Image.show(title='...') #5739
Comments
This function internally just (indirectly) calls From https://pillow.readthedocs.io/en/stable/reference/ImageShow.html#PIL.ImageShow.show:
From the provided list of image viewers, only one is listed as supporting
Edit: As discussed below, the |
Thanks, so it is a very limited feature. |
Ok, how about #5743, which would raise a warning for you, "title argument is not supported by this viewer"? |
I don't know if a warning is a good idea: Say a project uses There's nothing they can do except maybe raise an issue with that project. What can the project do? Add some code to only pass a |
Good point, thanks. Closing #5743 |
@FiReTiTi given that discussion, is there anything further you'd like to be done here? |
I have an answer about why it does not work, but my feeling is that a fix is necessary.
It seems the best option (IMHO). |
I don't think it's possible to implement this feature for all platforms. We could set the name of the temporary file to the title, but trying to filter out invalid filenames would then become its own problem (see https://stackoverflow.com/a/1976050/4093019 and #3450). |
I just face that "bug" today and despite the title option is only used for def get_command_ex(self, file, title=None, **options):
command = executable = "display"
if title:
command += f" -title {quote(title)}"
return command, executable |
Ok, I've created PR #5788 to add the |
Is there any indication this option has been around long enough that it won't fail on some (modernish) systems? |
https://web.archive.org/web/20120408021811/http://linux.die.net/man/1/display indicates that it has been there since at least 2012. |
Thank you all, merged! Let's close this unless there's more concrete steps to take. |
While updating my comment above (#5739 (comment)) I noticed #5788 didn't update the documentation so I have created #5790 to do that. |
What did you do?
I have a NumPy array representing an image that I import using ``, and then I display it using the method
show(title='A Title')
.What did you expect to happen?
I expected to see
Image
written as a title of the window.What actually happened?
I got a random text.
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: