How to C#: Converter
Use Convert SDK for C#
Microsoft PowerPoint to Image
Microsoft PowerPoint to Image
  |  
Home ›› XDoc.Converter ›› C# Converter: PowerPoint to Raster Images

C# Image Convert: How to Convert MS PowerPoint to Jpeg, Png, Bmp, and Gif


Enable C# Users to Quickly Convert and Turn PowerPoint File to Raster Images, like Jpeg, Png, Bmp, and Gif






By using RasterEdge XDoc.Converter for .NET, C# users are capable of rendering each PowerPoint slide to a raster image file, Jpeg, Png, Bmp or Gif. Furthermore, converting the whole PowerPoint document (.ppt and .pptx) to raster image file(s) are also supported. In the following part, you will get Visual C# programming demos for PowerPoint to Jpeg, PowerPoint to Png, PowerPoint to Bmp, and PowerPoint to Gif.




C# DLLs for PowerPoint Conversion to Images


Add necessary references to your C# project:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.DICOM.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.JBIG2.dll


  RasterEdge.Imaging.JPEG2000.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Converter.dll


  RasterEdge.XDoc.Excel.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.XDoc.Office.Inner.Office03.dll


  RasterEdge.XDoc.PDF.dll


  RasterEdge.XDoc.PowerPoint.dll


  RasterEdge.XDoc.TIFF.dll


  RasterEdge.XDoc.Word.dll


  RasterEdge.XImage.AdvancedCleanup.Core.dll


  RasterEdge.XImage.OCR.dll


  RasterEdge.XImage.OCR.Tesseract.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


Use the namespaces


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.Converter;




C#: Conversion to Jpeg from PowerPoint



The first piece of C# code is for PPT to Jpeg converting. This demo code just convert first Excel page to Jpeg image.




String inputFilePath = @"C:\input.pptx";
String outputFilePath = @"C:\output.jpg";

// Convert PowerPoint to jpg.
ConvertResult result = DocumentConverter.ToImage(inputFilePath, outputFilePath, FileType.IMG_JPEG);



C# sample code for MS PowerPoint to jpg image conversion. This demo code convert PowerPoint file all pages to jpg images.




// Define input and output files path.
String inputFilePath = @"C:\input.pptx";
String outputDirectory = @"C:\output\";

// Convert PowerPoint to jpg and show conversion result.
ConvertResult result = DocumentConverter.ToImages(inputFilePath, outputDirectory, "output", FileType.IMG_JPEG);




C#: Conversion to Png from PowerPoint



The second is for converting PPT document to Png image file. This demo code just converts PowerPoint first page to png image.




String inputFilePath = @"C:\input.pptx";
String outputFilePath = @"C:\output.png";

// Convert PowerPoint to png.
ConvertResult result = DocumentConverter.ToImage(inputFilePath, outputFilePath, FileType.IMG_PNG);



C# sample code for MS PowerPoint to Png image conversion. This demo code convert PowerPoint file all pages to Png images.




// Define input and output files path.
String inputFilePath = @"C:\input.pptx";
String outputDirectory = @"C:\output\";

// Convert PowerPoint to png and show conversion result.
ConvertResult result = DocumentConverter.ToImages(inputFilePath, outputDirectory, "output", FileType.IMG_PNG);




C#: Conversion to Bmp from PowerPoint



And you may use this C# programming example to get Bmp image from PowerPoint document. This demo code just converts PowerPoint first page to Bmp image.




String inputFilePath = @"C:\input.pptx";
String outputFilePath = @"C:\output.bmp";

// Convert PowerPoint to Bmp.
ConvertResult result = DocumentConverter.ToImage(inputFilePath, outputFilePath, FileType.IMG_BMP);



C# sample code for MS PowerPoint to Bmp image conversion. This demo code convert PowerPoint file all pages to Bmp images.




// Define input and output files path.
String inputFilePath = @"C:\input.pptx";
String outputDirectory = @"C:\output\";

// Convert PowerPoint to Bmp and show conversion result.
ConvertResult result = DocumentConverter.ToImages(inputFilePath, outputDirectory, "output", FileType.IMG_BMP);




C#: Conversion to Gif from PowerPoint



The last one is for rendering PowerPoint file to raster image Gif. This demo code just converts PowerPoint first page to Gif image.




String inputFilePath = @"C:\input.pptx";
String outputFilePath = @"C:\output.gif";

// Convert PowerPoint to Gif.
ConvertResult result = DocumentConverter.ToImage(inputFilePath, outputFilePath, FileType.IMG_GIF);



C# sample code for MS PowerPoint to Gif image conversion. This demo code convert PowerPoint file all pages to Gif images.




// Define input and output files path.
String inputFilePath = @"C:\input.pptx";
String outputDirectory = @"C:\output\";

// Convert PowerPoint to Gif and show conversion result.
ConvertResult result = DocumentConverter.ToImages(inputFilePath, outputDirectory, "output", FileType.IMG_GIF);