-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Support more options for reading/writing images in Tkinter #118271
Comments
Note that some Tk commands have options which cannot be directly translated to Python parameters: cc @terryjreedy |
Yet one note: We may get reports about broken behavior when people start to use the new method with this option, but I think that it is worth to implement it. The Tk bug can finally be fixed in the future releases, and it works at least with PPM files. |
…kinter * Add PhotoImage.read() to read an image from a file. * Add PhotoImage.data() to get the image data. * Add background and grayscale parameters to PhotoImage.write().
…kinter * Add PhotoImage.read() to read an image from a file. * Add PhotoImage.data() to get the image data. * Add background and grayscale parameters to PhotoImage.write().
…GH-118273) * Add PhotoImage.read() to read an image from a file. * Add PhotoImage.data() to get the image data. * Add background and grayscale parameters to PhotoImage.write().
…kinter (pythonGH-118273) * Add PhotoImage.read() to read an image from a file. * Add PhotoImage.data() to get the image data. * Add background and grayscale parameters to PhotoImage.write().
Feature or enhancement
PhotoImage has method
write()
which writes the image (or its part) to the file. But it lacks methods for two other related subcommand --read
, to read the image from the file, anddata
, to get the image data. I propose to add methodsread()
anddata()
.Also, the
write()
method can support two new options:background
andgrayscale
.Linked PRs
The text was updated successfully, but these errors were encountered: