title: How can I manually read a PNG image file and manipulate pixels in C#?
body: <p>There are already lots of classes and functions supplied with the .NET to manipulate Images including PNG. Like <a href="https://stackoverflow.com/questions/100247/reading-a-png-image-file-in-net-2-0">Image, Bitmap, etc. classes</a>. Suppose, I don't want to use those classes.</p>
  
  <p>If I want to manually read/write a PNG image as a binary file to work with pixels then how can I do that?</p>
  
  <pre><code>using(FileStream fr = new FileStream(fileName, FileMode.Open)) 
  {
        using (BinaryReader br = new BinaryReader(fr))
        {
            imagesBytes= br.ReadBytes((int)fr.Length);
        }  
  }
  </code></pre>
  
  <p>How can I get hold of individual pixels to manipulate them?</p>