This is the most common format of image files. JPG deserves its popularity because of its flexible data compression capabilities. If necessary, the image can be saved with maximum quality. Or it can be compressed to the minimum file size for transmission over the network or converted into any other format. JPG uses a lossy compression algorithm that greatly simplifies data transfer. In practice, saving a photograph with minimal compression does not cause any visible deterioration in image quality. That's why JPG is the most common and popular format for storing graphic files.
The PNG format was created to both enhance and replace the GIF format with a graphic format that does not require a license to use. Unlike GIF, PNG has alpha channel support and the ability to store an unlimited number of colors. PNG compresses data without losses, making it very useful for storing intermediate versions of image processing. Portable Network Graphics is a convenient format to place the file in an electronic document if it does not need to be printed later. PNG is completely unsuitable for printing, hence you have to convert it to print.