Somewhat off topic:
- I'm getting warm fuzzies about all this. It's awesome that rdPNG has been of use since we put it out.
- As requested originally (years ago), shift and xor operators/functions from Roku would help a lot.
- The optimizations found are really interesting. Especially the typed variables. We did preliminary tests around the time we wrote the libraries, and found that for general use types variables were actually slightly slower in some cases that their untyped counterparts. That may have been optimized away in later firmware versions, or the cost of boxing may have made a difference in this case (obviously there are other benefits to typing variables).
- We seriously considered writing a zlib implemetation originally, but found a workaround for our needs (palettized PNGs, where we just need to set the colors to create different colored PNGs), and we were trying to meet the Roku channel contest deadline for KidPaint (no win, damn you renojim! 😉
rdPNG was actually created as a way to easily and programmatically access and modify PNG pallete entries. You can actually see the end result in KidPaint, which is itself open sourced and on github (
https://github.com/rokudev/kidpaint). It's horribly dated, especially since there's a real roScreen object to use now (in my day, we had to use multiple roImageCanvas object and weird timing quirks to achieve animation, and we did it up-hill both ways while walking to school...
😛 )
Also, if anyone's interesting in commit bits to the librokudev repo, that can definitely be arranged... Otherwise, we accept pull requests.