In brief
PNG stores raster images and can use an alpha channel for transparency. The appropriate file depends on the type of graphics, the colors, and the way of exporting.
Useful to know
PNG is a familiar choice for screenshots, schematics and images that need to keep clear edges. The name means Portable Network Graphics. The W3C specification describes a format for raster images with lossless compression and alpha channel capability. [1] The two characteristics perform different tasks. Compression determines how the data is stored, and transparency determines how the image combines with the background. It is good to distinguish them, instead of any image with a transparent background simply being called PNG.
A raster image is made of pixels. The format can store various color representations, including palette images and images with more color information. W3C also provides data for the color space. [1] This means that two files of the same visible size can have different internal organization and different volume. The number of pixels is important, but it doesn't describe everything. When comparing, one should consider what information is included and how the specific file is prepared.
The alpha channel allows for different degrees of transparency. The formal introduction of the PNG project states it as one of the important capabilities of the format. [2] Instead of the edge being limited to a fully visible or completely hidden pixel, there may be gradual mixing with the background. This is useful for soft ends and other graphic elements. However, the appearance should be checked on the real backgrounds, because a nice result on a white screen does not prove the same on a dark one.
The same introduction considers PNG both as an image editing tool and as a format for web use. The compression score also depends on the software used. [2] Therefore, "no losses" should not be confused with "always the smallest file". A picture with many minor differences may behave differently from a simple scheme with monochromatic fields. The appropriate choice depends on which information should remain accurate and what volume is acceptable for the mode of use.
Let's take an image of a table of small inscriptions. If it is exported for an article, it is useful to compare the readability of the letters and the size of the resulting file. Then you need to check that the picture is displayed with an appropriate width, instead of being excessively enlarged. Lossless compression does not create a detail that is missing in the source. If the original table shot is blurry, changing the extension itself will not fix the contents of the letters.
When working with PNG, it is useful to keep a clear link between the original, the exported version and its place on the page. For a graphic with transparency, the background and edges are checked; for a scheme, the text and lines; for a large image, the volume and actual need of all pixels. The format provides reliable technical capabilities when used according to the task. The best result is a file that retains the necessary visual content and is displayed predictably in the reader's environment.
Sources
For further detail and to check the information: