Commit 7a45eb9e authored by Andrés Delfino's avatar Andrés Delfino Committed by Serhiy Storchaka

bpo-33283: Mention PNG as a supported format by Tcl/Tk. (GH-6479) (GH-6542)

(cherry picked from commit 4b685bf7)

Update only the documentation about image formats.
parent d988c0b6
......@@ -801,12 +801,13 @@ Menu indexes (menu.invoke(), menu.entryconfig(), etc.)
Images
^^^^^^
Bitmap/Pixelmap images can be created through the subclasses of
:class:`Tkinter.Image`:
Images of different formats can be created through the corresponding subclass
of :class:`Tkinter.Image`:
* :class:`BitmapImage` can be used for X11 bitmap data.
* :class:`BitmapImage` for images in XBM format.
* :class:`PhotoImage` can be used for GIF and PPM/PGM color bitmaps.
* :class:`PhotoImage` for images in PGM, PPM, GIF and PNG formats. The latter
is supported starting with Tk 8.6.
Either type of image is created through either the ``file`` or the ``data``
option (other options are available as well).
......
......@@ -3362,7 +3362,7 @@ class Image:
self.tk.call('image', 'width', self.name))
class PhotoImage(Image):
"""Widget which can display colored images in GIF, PPM/PGM format."""
"""Widget which can display images in PGM, PPM, GIF, PNG format."""
def __init__(self, name=None, cnf={}, master=None, **kw):
"""Create an image with NAME.
......@@ -3426,7 +3426,7 @@ class PhotoImage(Image):
self.tk.call(args)
class BitmapImage(Image):
"""Widget which can display a bitmap."""
"""Widget which can display images in XBM format."""
def __init__(self, name=None, cnf={}, master=None, **kw):
"""Create a bitmap with NAME.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment