updates the grayscale conversion method to handle alpha and retina displays