title: No imaging component suitable to complete this operation was found
body: <p>Herein is my piece of code but I've got an error </p>
  
  <blockquote>
    <p><strong>No imaging component suitable to complete this operation was found</strong></p>
  </blockquote>
  
  <p>in "<strong>EndInit()</strong>" line.</p>
  
  <p>I've read WIC registry modification (NB: my OS is Windows 7 and my IDE is VS 2010) but it did not work at all :(</p>
  
  <p>I was wondering if you let me know what do I do to solve it. </p>
  
  <pre><code>BitmapImage myBitmapImage = new BitmapImage();
  
  
  byte[] DM = new byte[307200];
  
  for (int i = 0; i &lt; 640; i++)
      for (int j = 0; j &lt; 480; j++)
          if (i &lt; 500)
              DM[i + j] = i;
  
  using (System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(DM))
  {
      myBitmapImage.BeginInit();
      myBitmapImage.StreamSource = memoryStream;
      myBitmapImage.DecodePixelWidth = 640;
      myBitmapImage.EndInit();
  
  }
  
  img.Source = myBitmapImage;
  </code></pre>