Added encoding to saving png images. Removed encoding from file.