title: c# how to convert PNG / JPG to TGA 32bit?
body: <pre><code>        private void ConvertButton_Click(object sender, EventArgs e)
          {
            Bitmap original = new Bitmap(@"filepath.cover.png");
            Bitmap clone = new Bitmap(original.Width, original.Height, PixelFormat.Format32bppPArgb);
            using (Graphics conv = Graphics.FromImage(clone))
            {
              conv.DrawImage(original, new Rectangle(0, 0, clone.Width, clone.Height));
            }
          }
  </code></pre>
  
  <p>Hello everyone, i need some help. </p>
  
  <p>I trying to convert PNG or JPEG files to TGA 32bit files and save them, I am still new to programming and could not find an answer here. I found only this code snip here and tried to get him to run, i tried alot of versions to get an output file, but nothing worked, sometimes I got a blank file, sometimes a corrupt one</p>
  
  <p>thank you to everyone who helps me.</p>
  
  <p>Edit:
  First of all, thank you, I tried your code and it gives me an empty file. I'm just trying this:</p>
  
  <pre><code>private void TgaConvert_Click(object sender, EventArgs e)
  {
      TGA original = new TGA(@"file.path.cover.png");
      TGA clone = new TGA(original.Width, original.Height, TgaPixelDepth.Bpp32,
      TgaImageType.Uncompressed_TrueColor);
  
      using (??? conv = ???(clone))
      {
          conv.???(original, new ???(0, 0, clone.Width, clone.Height));
          clone.Save(@"file.path.cover.tga");
      }
  }
  </code></pre>
  
  <p>at the places with "???" I can't get any further</p>