Grayscale Image Luminance Analyzer - Coding problem | OneNoughtOne