Class PresentationAnimationConverter
Represents the conversion of PowerPoint slide to series of images based on animation order.
Inheritance
System.Object
PresentationAnimationConverter
Implements
System.IDisposable
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public class PresentationAnimationConverter : Object, IDisposable
Constructors
PresentationAnimationConverter()
Declaration
public PresentationAnimationConverter()
Methods
Convert(ISlide, ImageFormat)
Declaration
public Stream[] Convert(ISlide slide, ImageFormat imageFormat)
Parameters
Type | Name | Description |
---|---|---|
ISlide | slide | |
ImageFormat | imageFormat |
Returns
Type |
---|
System.IO.Stream[] |
Examples
//Open a PowerPoint Presentation.
IPresentation pptxDoc = Presentation.Open("Input.pptx");
//Initialize the PresentationAnimationConverter to perform slide to image conversion based on animation order.
PresentationAnimationConverter animationConverter = new PresentationAnimationConverter();
int i = 0;
foreach (ISlide slide in pptxDoc.Slides)
{
//Convert the PowerPoint slide to a series of images based on entrance animation effects.
Stream[] imageStreams = animationConverter.Convert(slide, Syncfusion.Drawing.ImageFormat.Png);
//Save the image stream.
foreach (Stream stream in imageStreams)
{
//Dispose the stream.
stream.Dispose();
}
}
//Close the Presentation
pptxDoc.Close();
//Dispose the instance.
animationConverter.Dispose();
'Open a PowerPoint Presentation.
Dim pptxDoc As IPresentation = Presentation.Open("Input.pptx")
'Initialize the PresentationAnimationConverter to perform slide to image conversion based on animation order.
Dim animationConverter As PresentationAnimationConverter = New PresentationAnimationConverter()
Dim i As Integer = 0
For Each slide As ISlide In pptxDoc.Slides
'Convert the PowerPoint slide to a series of images based on entrance animation effects.
Dim imageStreams As Stream() = animationConverter.Convert(slide, Syncfusion.Drawing.ImageFormat.Png)
'Save the image stream.
For Each stream As Stream In imageStreams
'Dispose the stream.
stream.Dispose()
Next
Next
'Close the Presentation
pptxDoc.Close()
'Dispose the instance.
animationConverter.Dispose()
Dispose()
Releases all resources used by the object.
Declaration
public void Dispose()
Examples
//Open a PowerPoint Presentation.
IPresentation pptxDoc = Presentation.Open("Input.pptx");
//Initialize the PresentationAnimationConverter to perform slide to image conversion based on animation order.
PresentationAnimationConverter animationConverter = new PresentationAnimationConverter();
int i = 0;
foreach (ISlide slide in pptxDoc.Slides)
{
//Convert the PowerPoint slide to a series of images based on entrance animation effects.
Stream[] imageStreams = animationConverter.Convert(slide, Syncfusion.Drawing.ImageFormat.Png);
//Save the image stream.
foreach (Stream stream in imageStreams)
{
//Dispose the stream.
stream.Dispose();
}
}
//Close the Presentation
pptxDoc.Close();
//Dispose the instance.
animationConverter.Dispose();
'Open a PowerPoint Presentation.
Dim pptxDoc As IPresentation = Presentation.Open("Input.pptx")
'Initialize the PresentationAnimationConverter to perform slide to image conversion based on animation order.
Dim animationConverter As PresentationAnimationConverter = New PresentationAnimationConverter()
Dim i As Integer = 0
For Each slide As ISlide In pptxDoc.Slides
'Convert the PowerPoint slide to a series of images based on entrance animation effects.
Dim imageStreams As Stream() = animationConverter.Convert(slide, Syncfusion.Drawing.ImageFormat.Png)
'Save the image stream.
For Each stream As Stream In imageStreams
'Dispose the stream.
stream.Dispose()
Next
Next
'Close the Presentation
pptxDoc.Close()
'Dispose the instance.
animationConverter.Dispose()
Implements
System.IDisposable