ANSI C, desaturation of bitmap image file