I was thinking while in the shower....
Wouldn't
testimg(x,y) be not only more constant to the graal scripting language, but more practical? It would return the index of the image located at the given x and y position and you could test if it was true.
edit: Sorry for double post
