RGBA -> VGA image encoding