Would the expand() not be a perfect candidate for the now available assembler?
In a way, however as you couldn't allocate a buffer big enough for everything you'd still have to send the pixels in chunks. Having it built-in to 'write' could save that overhead.
Another option that would make the assembler easier is something like E.mapInPlace(to,from,mapFn). Of course if JS had an in-place version of map you wouldn't need any of this either :(
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
In a way, however as you couldn't allocate a buffer big enough for everything you'd still have to send the pixels in chunks. Having it built-in to 'write' could save that overhead.
Another option that would make the assembler easier is something like
E.mapInPlace(to,from,mapFn)
. Of course if JS had an in-place version ofmap
you wouldn't need any of this either :(