standalone function to premultiply RGB by alpha channel