PNG vs TGA Which Should I Use

My Texture Size differs while using different formats.
For Example
Both are same texture with dirrent formats
(.tga) file size is 16 MB
(.png) file size is 7 MB

I want to know if is use .png file format can I reduce the game size or .tga will also give the same result (regarding storage size)

Can anyone help me?

Well first of all why would anyone nowadays use targa to store images? It’s either uncompressed or only run length encoded and depending on the image content that might not help at all. PNG is a lossless image format with much better compression.

However if you want to use TGA, just use it because it doesn’t affect the build size at all. Unity stores the images in an appropriate hardware supported texture format for the given build platform. If the texture is compressed at all and which max resolution it should have can be changed at the import settings of each texture.

There is one very good reason to use TGA over PNG:

most PNG compressors set the RGB component of completely transparent pixels to either complete black or complete white, which is fine so long as:

  • the alpha component is actually used as transparency
  • there is no filtering applied

However, depending of how the images get filtered when downsizing, the RGB part of those completely transparent pixels may be accessed and affect the RGB value of filtered pixels that are not completely transparent, and then you’ll see strange dark or bright edges.

Also if you use the alpha channel for something else than transparency (like reflectivity or self illumination or something like that) then obviously this is not going to work well with regular PNG compressors. In these cases TGA will yield the desired results.