Convert PNG to PPT

Images make for aesthetic, inspiring, and professional presentations. By adding images to a PowerPoint, you get to share information in an easily digestible format with your audience.

This article will show you how to convert PNG to PPT in C#. PNG is a very popular format used to store images, so you are likely to benefit from knowing how to add PNG images to PowerPoint presentations.

C# API to Convert PNG to PPT

Aspose.Slides for .NET is a powerful API that enables developers and applications to create, read, edit, convert, and manipulate PowerPoint presentations (without Microsoft PowerPoint or Office). Once you get this product, you will be able to convert PNG images to a PPT presentation using just a few lines of C# code.

To install Aspose.Slides for .NET, see this Installation guide.

Convert PNG to PowerPoint in C#

  1. Create an instance of the Presentation class.
  2. Load the images you want as slides in your presentation.
  3. Create slides based on the images.
  4. Specify the dimensions.
  5. Save the resulting presentation.

This C# code shows you how to convert PNG to PPT:

Some images in a PowerPoint presentation

Images in a PowerPoint presentation

Info: Aspose offers a free PNG to PowerPoint conversion service, which is a live implementation of the process described here.

Add Web Image to PowerPoint in C#

In the previous section, we walked you through an operation on inserting PNG images stored (locally) on your computer into a PowerPoint presentation. However, if the image you want to use is stored online, you have to do things this way:

  1. Create an instance of the Presentation class.
  2. Get the first slide’s reference through its index.
  3. Declare the byte array and create an instance of the WebClient class.
  4. Load the image stored on the web.
  5. Create a slide based on the image.
  6. Specify the slide dimensions.
  7. Save the resulting presentation.

This C# code shows you how to add an image stored on the web to a PowerPoint:

Get a Free License

Want to test out Aspose.Slides features without limitations? Get a free temporary license.

Conclusion

We believe you now know how to use a powerful .NET library to convert PNG images to a PowerPoint presentation in C#. You may want to see the product page for the PNG to PPT conversion operation.

To learn more about Aspose.Slides features, see our documentation. If you have questions, you can post them on our forum.

See Also