TXT is a file format that contains the text, organized in rows. Text files opposed binaries that contain data that is not intended for interpretation as a text (encoded sound or image). The text file can contain both formatted and unformatted text. Since the very simple text files, they are frequently used for storing data.
PNG is a raster graphic data storage format that uses lossless compression algorithm to Deflate. PNG was created as a free format to replace GIF. PNG supports three main types of raster images: grayscale image, a color indexed image and the color image. PNG format stores graphical information in a compressed form.