how do you read image files from torquescript
If you make a GuiBitmapCtrl then you can get individual pixel colors from it with
.getPixelColor(x, y); but the y coordinate is actually the coordinate relative to the Blockland window instead of the GuiBitmapCtrl(or something like that), so I made this function to fix it. It's also kind of trash because if the pixel is obstructed by anything(if it's something outside of the Blockland application then it's fine) then it'll get the color of the thing obstructing it.
function guiBitmapCtrl::getRealPixelColor(%obj, %x, %y)
{
%realY = -2 * getWord(%obj.getScreenPosition(), 1);
%realY += getWord(getRes(), 1) - %y;
%realY--;
return %obj.getPixelColor(%x, %realY);
}
inb4 even more people make even more research img2brick
Real images are so big that they take forever and ever to do.