TGA is a long-used raster graphic format. It was developed by Truevision Inc. (now Pinnacle Systems) back in 1984. It was initially used by the developer only for its own graphic adapters, but gradually gained popularity (primarily in the field of video processing and animation). Widely used in computer games, where it is used to store textures (including 3D video games). The name of the format comes from Targa Graphic. TGA files may partially contain image transparency information. They can become the main one for creating GIFs.
PNM is a raster image category format. This is a bitmap bitmap created in Portable Any Map format. As you know, this format was intended from the very beginning to process some types of portable monochrome black and white images (PBM), color images (PPM) and grayscale images with shades of gray (PGM). Allows the inclusion of raster graphics data in the .PBM, .PGM or .PPM format. Such formats can provide an intermediate representation of data during the conversion of raster graphic files by different platforms. Separate applications support these three formats directly because they are defined as the PNM format. Able to be stored using binary data or ASCII text. PNM is the common format for the Netpbm package. It contains intermediate files that are used when it comes to converting several open source programs called Portable Bitmap. The PPM format was developed by J. Poskanzer. This is the easiest format for storing graphics. PNM files store one image. They do not apply compression. To view and process a bitmap image in PNM format, you can use programs such as GIMP, ImageMagick, Newera Graphics Converter Pro, XnViewMP. The same programs are able to convert images of this format.