classification
Title: tkinter: PhotoImage transparency methods
Type: enhancement Stage: patch review
Components: Tkinter Versions: Python 3.8
process
Status: open Resolution:
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 2018-11-08 06:47 by ZackerySpytz.

Pull Requests
URL Status Linked Edit
PR 10406 open ZackerySpytz, 2018-11-08 06:46
Messages (2)
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 self.tk.call(self.name, 'transparency', 'get', x, y)

def transparency_set(self, x, y, boolean=True):
    """Make pixel at (x,y) transparent if boolean is true, opaque otherwise. """
    
    self.tk.call(self.name, 'transparency', 'set', x, y, boolean)
msg329455 - (view) Author: Zackery Spytz (ZackerySpytz) * Date: 2018-11-08 06:47
I've created a PR for this issue.
History
Date User Action Args
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