gh-118271: Support more options for reading/writing images in Tkinter (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().
This commit is contained in:
Serhiy Storchaka 2024-05-06 18:06:06 +03:00 • committed by GitHub
parent fc50f1bdba
commit 709ca90a00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 221 additions and 15 deletions

View file

@ -0,0 +1,4 @@
Add the :class:`!PhotoImage` methods :meth:`~tkinter.PhotoImage.read` to
read an image from a file and :meth:`~tkinter.PhotoImage.data` to get the
image data. Add *background* and *grayscale* parameters to
:class:`!PhotoImage` method :meth:`~tkinter.PhotoImage.write`.