title: Unsupported Pixel Format of source or template image. AForge Imaging
body: <p>I am getting the following Exception at <code>ProcessImage(bitmap1, bitmap2)</code>; </p>
  
  <pre><code>Unsupported Pixel Format of source or template image
  </code></pre>
  
  <p>and this is my code:</p>
  
  <pre><code>public static double FindComparisonRatioBetweenImages(
      System.Drawing.Image one, System.Drawing.Image two)
  {
      Bitmap bitmap1 = new Bitmap(one);
      Bitmap bitmap2 = new Bitmap(two);
  
      ExhaustiveTemplateMatching tm = new ExhaustiveTemplateMatching(0);
      TemplateMatch[] matchings = null;
  
      matchings = tm.ProcessImage(bitmap1, bitmap2); // Exception occurs here!
  
      return matchings[0].Similarity;
  }
  </code></pre>
  
  <p>I have also passed <code>managedImage</code> from the below code into the method, but it still gives error:</p>
  
  <pre><code>UnmanagedImage unmanagedImageA = UnmanagedImage.FromManagedImage(bitmap1);
  Bitmap managedImageA = unmanagedImageA.ToManagedImage();
  UnmanagedImage unmanagedImageB = UnmanagedImage.FromManagedImage(bitmap2);
  Bitmap managedImageB = unmanagedImageB.ToManagedImage();
  </code></pre>
  
  <ol>
  <li>I have passed Images randomly from my computer, they all give exception.</li>
  <li>I have passed Blank Image edited in paint into the method,it still give exception.</li>
  <li>Also checked, jpeg, png, bmp formats, nothing work.</li>
  </ol>