From: Hidetoshi NAGAI Date: 2005-10-19T01:02:01+09:00 Subject: Re: tk - canvas accessing color for each pixel From: Ed Redman Subject: tk - canvas accessing color for each pixel Date: Tue, 18 Oct 2005 21:41:57 +0900 Message-ID: > I would like to access and change the color of any pixel on a Tk/canvas. A canvas widget doesn't support to access per pixel. Although you can do that if each pixel is represented by a line item, that will be incredibly slow. If you want to do that, I think, you'll have to use a PhotoImage object. On a PhotoImage, you can access and change the color of any pixel. Please use TkPhotoImage#get and TkPhotoImage#put. And please read "photo" manual of Tcl/Tk. Stadard Tcl/Tk libraries supports only GIF and PPM/PGM. If you want to treat other image formats, please use "Img" extesion of Tcl/Tk. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)