2 ms·
I am also currently working on a web-based remote desktop app as a side project. I am using socket.io (python port) and pngs, using transparency to only update
by ma2rten 13y ago
I am also currently working on a web-based remote desktop app as a side project. I am using socket.io (python port) and pngs, using transparency to only update the part of the image that changed between frames.
However, I also thought about using long-loading animated gifs, because:
1. Run-length encoding seems to be ideal for screenshots.
2. You can use transparency to only update pixels that changed between frames without need for an alpha layer.
3. Palette-based does not seem to be a big issue for screenshots, which typically have few colors.
4. You use an additional frames to update colors that are off [1]. That way you get the best of both worlds: low latency and high quality images.
Do you have any issues using gifs? Memory usage, closing connections, etc...?
[1] http://phil.ipal.org/tc.html# http://phil.ipal.org/tc.html#
- pornel 13y agoGIF doesn't have RLE. It only has dictionary built from "previous pattern + 1 new pixel", so even transparent areas are wasteful (1+2+3+4+5+6px etc in optimal case and you have to restart when 4K-entry dictionary fills up).