I made a function that gets the correct pixel color, but it's still really slow.
function guiBitmapCtrl::getRealPixelColor(%obj, %x, %y)
{
%realY = -2 * getWord(%obj.getScreenPosition(), 1);
%realY += getWord(getRes(), 1) - %y;
%realY -= 1;
return %obj.getPixelColor(%x, %realY);
}
Because the getPixelColor function is junk, you need to be able to see the guiBitmapCtrl and it needs to be unobstructed by other GUI elements(don't think that the mouse can obstruct it).