PresentationPlayer
Classe PresentationPlayer
Représente le lecteur des animations associées à la Presentation
.
public class PresentationPlayer : IDisposable
Constructeurs
Propriétés
Nom | Description |
---|
FrameIndex { get; } | Obtient l’index de l’image. |
Méthodes
Autres Membres
Exemples
[C#]
using (Presentation pres = new Presentation("pres.pptx"))
{
using (var animationsGenerator = new PresentationAnimationsGenerator(pres))
{
// Lire l'animation avec 33 FPS
using (var player = new PresentationPlayer(animationsGenerator, 33))
{
player.FrameTick += (sender, args) =>
{
args.GetFrame().Save(Path.Combine("33fps", $"frame_{sender.FrameIndex}.png"));
};
animationsGenerator.Run(pres.Slides);
}
// Lire l'animation avec 45 FPS
using (var player = new PresentationPlayer(animationsGenerator, 45))
{
player.FrameTick += (sender, args) =>
{
args.GetFrame().Save(Path.Combine("45fps", $"frame_{sender.FrameIndex}.png"));
};
animationsGenerator.Run(pres.Slides);
}
}
}
Voir aussi