C#: Online Guide
How To: powerpoint SDK
Insert Image
  |  
Home ›› XDoc.PowerPoint ›› C# PowerPoint: Insert Image

C# PowerPoint - Insert Image to PowerPoint File Page in C#.NET


Insert Image to PowerPoint Document Page in C# Project




Overview



RasterEdge XDoc.PowerPoint Library provide some methods for developers to insert image to PowerPoint file pages. While, if you want to insert various type image, you may need add the reference RasterEdge.XImage.Raster.dll into your project. If not, you can only add bitmap to the  PowerPoint document page(s).


Related .net document control helps:
asp.net edit pdf image using c#: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
asp.net edit pdf text using c#: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net view tiff images: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
c# asp.net dicom viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net pdf document viewer c#: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
asp.net pdf viewer using c#: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net sharepoint document viewer open source: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint




Add Image to PowerPoint File Page Using C#



Add references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Office.Inner.Office03.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.XDoc.PowerPoint.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


Using namespace:


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.PowerPoint;


  using RasterEdge.Imaging.Raster.Core;


Add image to PowerPoint file page using C#.




PPTXDocument doc = new PPTXDocument(@"C:\1.pptx");
BasePage page = doc.GetPage(0);
REImage image = new REImage(@"C:\logo2.jpg");
page.AddImage(image, new Point(100, 100));
doc.Save(@"C:\1image.pptx");