Separate background image from ppt slide using c#
<p>I have converted the ppt file to html file with each slide as jpeg file. </p>

<pre><code>Microsoft.Office.Interop.PowerPoint.Application pptApplication = 
    new Microsoft.Office.Interop.PowerPoint.Application();       

 Presentation pptPresentation = 
    pptApplication.Presentations.Open(pptFilePath, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);

    pptPresentation.SaveAs(imageFilePath, PpSaveAsFileType.ppSaveAsPNG, MsoTriState.msoFalse);
    int i = 1;
    using (FileStream fs = new FileStream(txt_Output.Text + "\\index.html", FileMode.Create))
    {
        using (StreamWriter w = new StreamWriter(fs, Encoding.UTF8))
        {
            w.WriteLine("&lt;table&gt;");
            w.WriteLine("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
            w.WriteLine("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
            foreach (Microsoft.Office.Interop.PowerPoint.Slide slide in pptPresentation.Slides)
            {                        
                System.Drawing.Image imgPhoto = System.Drawing.Image.FromFile(txt_Output.Text + "\\Slide" + i.ToString() + ".jpg");
                string imagepath = string.Format("&lt;img src='" + txt_Output.Text + "\\Slide" + i.ToString() + ".jpg' width='{1}' height='{2}'/&gt;", imageFilePath, imgPhoto.Width, imgPhoto.Height);

                w.WriteLine("&lt;tr&gt;&lt;td&gt;" + imagepath + "&lt;/td&gt;&lt;/tr&gt;");
                w.WriteLine("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
                w.WriteLine("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
                i = i + 1;
            }
            w.WriteLine("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
            w.WriteLine("&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;");
            w.WriteLine("&lt;/table&gt;");

        }
    }
</code></pre>

<p>Since the size of the converted file is not reduced, i thought of seperating the background image from each slide. I wanted to copy the background file from a slide to a new file and make the each slides background is transparent and save and then make an html file.</p>

<p>How can I do this using c#?</p>
