buffering grayscale operation