"EnTerr" wrote:
After sleeping on it, i feel something like createObject("roBitmap", {width: w, height: h, byteArray: ba}) is probably the cleanest way to do it, since the functionality is already there for createObject("roBitmap", String filename) - it reads the file, uncompresses it to a buffer and then creates the ro-wrapper with params around that buffer, so same thing sans reading and uncompressing file; re-use the code.
That wouldn't allow you to manipulate existing bitmaps, though. A SetByteArray() method would work no matter how the bitmap was created. Given your VNC example, you could create a full screen bitmap, and just call SetByteArray for every 16x16 section that changes on refresh, instead of having to create individual 16x16 bitmaps and draw them to the master. Better yet, you could set the byte array directly on the roScreen, further reducing the overhead... no bitmaps, DrawObjects, or DrawRects needed.