You found a bug, there's something wrong with canvas' private variables. Ill let you post it to the tracker. Beyond that Im afraid this will never work very well, as it has to get the information from the gpu. So you would need a "buffer" for the pasting, but you would need one in between each time it got rgb, and set it to text. If you really want to do it, I'd suggest using global variables, or a delayed function. Plus there might be something wrong with canvas as well, not sure but its size is acting wierd, you have to manually set it or it always goes back to 256.