This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: tkinter: PhotoImage transparency methods
Type: enhancement Stage: resolved
Components: Tkinter Versions: Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: None Becoming, ZackerySpytz, mkiever, serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2015-10-21 08:56 by None Becoming, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 10406 merged ZackerySpytz, 2018-11-08 06:46
Messages (3)
msg253281 - (view) Author: (None Becoming) Date: 2015-10-21 08:56
The transparency methods of tkinter.PhotoImage seem to be missing.
Presumably, they would go something like:

def transparency_get(self, x, y):
    """Returns a boolean indicating if the pixel at (x,y) is transparent. """
    return, 'transparency', 'get', x, y)

def transparency_set(self, x, y, boolean=True):
    """Make pixel at (x,y) transparent if boolean is true, opaque otherwise. """, 'transparency', 'set', x, y, boolean)
msg329455 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2018-11-08 06:47
I've created a PR for this issue.
msg339491 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-04-05 10:17
New changeset 50866e9ed3e4e0ebb60c20c3483a8df424c02722 by Serhiy Storchaka (Zackery Spytz) in branch 'master':
bpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406)
Date User Action Args
2022-04-11 14:58:23adminsetgithub: 69637
2019-04-05 10:29:17serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-04-05 10:17:17serhiy.storchakasetmessages: + msg339491
2018-11-08 06:47:50ZackerySpytzsetnosy: + ZackerySpytz

messages: + msg329455
versions: + Python 3.8, - Python 3.6
2018-11-08 06:46:49ZackerySpytzsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request9690
2018-04-08 16:53:10mkieversetnosy: + mkiever
2015-10-26 01:37:26terry.reedysetnosy: + terry.reedy, serhiy.storchaka
stage: needs patch

versions: + Python 3.6
2015-10-22 12:00:03vstinnersettitle: PhotoImage transparency methods -> tkinter: PhotoImage transparency methods
2015-10-21 08:56:35None Becomingcreate