C# Implementation of Png reader and writer