c# how to convert PNG / JPG to TGA 32bit?

Solution 1:

Unfortunately there is no write support for TGA included in the .net framefork. But there are other open source libraries available. Have a look at TGASharpLib from Zelenskyi Alexandr (https://github.com/ALEXGREENALEX/TGASharpLib).

If a apply his sample to your code, then this is the result:

using TGASharpLib;
...

private void ConvertButton_Click(object sender, EventArgs e)
{
    var tga = new TGA(@"filepath.cover.png");
    tga.Save(@"filepath.cover.tga");        
}