added WritePNG to the generic IMemoryImage