Am I over simplifying or does this in general do the same thing with some help from imagemagick on linux with /dev/fb?
convert -size $(tr ',' 'x' < /sys/class/graphics/fb0/virtual_size) -depth 8 bgra:/dev/fb0 snap.png