search for: tk2ascii

Displaying 1 result from an estimated 1 matches for "tk2ascii".

Did you mean: ps2ascii
2002 Mar 14
1
gif, jpeg and png image files reader AND tcltk image
...gt; x.data <- tkcmd(x, "data") gives you the data for the image, but is in a format internal to tcltk. But then it turns out that the format is very straightforward to understand: the enclosed simple function decodes the format and returns a matrix for the data, > x.data.ascii <- tk2ascii(x.data) Then we are done! (This function currently only deals with red color channel, but expansion to other 2 are very straightforward.) On a related note, I have earlier posted a message to ask about whether one can directly paint an image matrix to a tcltk canvas, the answer is no. One has to...