title: How to change the color of a pixel use Magick.NET?
body: <p>How to change pixel color on the image use the lib Magick.NET. I use the following code:</p>
  
  <pre><code>MagickImage img = new MagickImage(@"d:\TEST\110706M01000509.jpg");
  WritablePixelCollection pc = img.GetWritablePixels(100, 100, 50, 50);
  
  foreach (Pixel p in pc)
  {
      p.SetChannel(0, 255);
      p.SetChannel(1, 0);
      p.SetChannel(2, 0);
  }
  
  pc.Write();
  
  img.Write(@"d:\TEST\110706M01000509_.jpg");
  </code></pre>
  
  <p>But on the output image the color of the pixels no red.</p>
  
  <p>Example:</p>
  
  <p><a href="https://i.stack.imgur.com/IqECB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IqECB.jpg" alt="image"></a></p>
  
  <p>Why the color of figures is not red?</p>