Calculate average color for a bitmap.