title: Draw histogram from points array
body: <p>I am working on an image processing project.</p>
  
  <p>I want to draw an histogram for an image. I get red color from an image but i don't know how to draw it as an histogram so I need your help.</p>
  
  <p>This is my code:</p>
  
  <pre><code>class MainClass
  {
  
      public static void Main(string[] args)
      {
          Bitmap bmp = new Bitmap("F://DSC_0242.jpg");
          int[] histogram_r = new int[255];
          int max = 0;
  
          for (int i = 0; i &lt; bmp.Width; i++)
          {
              for (int j = 0; j &lt; bmp.Height; j++)
              {
                  histogram_r[bmp.GetPixel(i,j).R]++;
                  if (max &lt; histogram_r[bmp.GetPixel(i,j).R])
                      max = histogram_r[bmp.GetPixel(i,j).R];
              }
          }
  
          Bitmap img = new Bitmap(256, max + 10);
          Point[] points = new Point[256];
  
          for (int i = 0; i &lt; histogram_r.Length; i++)
          {
              points[i] = new Point(i, img.Height-(histogram_r.Length/100));
  
          }
      }
  }
  </code></pre>