hi,
does the aspose.slides support set custom animation with a picture?
in the Microsoft PowerPoint, if i insert a picture to ppt, then right click the picture, choose custom animation, then i can set the direction and speed of the animation.
how can using aspose.slides to achieve this?
Best Regard!
Eric
Hi Eric,
Thanks for inquiring Aspose.Slides.
I have observed your requirements and like to mention that Aspose.Slides allows you to apply animation effects on shapes. Please visit this
documentation link for applying animation effects on shapes.
Best Regards,
hi,
i am sorry, i have refer to the document of your mentioned and using the code to test. but there are any animation in the result file. i have using Microsoft PowerPoint to create a animation file ,please refer to the pptx file in the attachment. how can i using Aspose.Slides to achieve this like the file in the attachment. if you can, please give me a simple example.
Best Regard!
Eric
Hi Eric,
Thanks for sharing presentation. In presentation I can see two presentation effects. Can you please share a presentation without Aspose.Slides watermark along with desired animation effect that you want to set. I will investigate the requirements further to help you.
Best Regards,
hi,
thank for your reply. i have create a new pptx file without watermark.you can see the animation effects when click “Preview” button. please refer to the file in the attachment.
Best Regard!
Eric
Hi Eric,
I have observed the requirements from you and have created a sample code with desired animation effect. Please try following code on your end.
public static void TestAnimation()
{
String path = @“C:\Aspose”;
Presentation presentation = new Presentation();
ISlide slide = presentation.Slides[0];
System.Drawing.Image image = (System.Drawing.Image)new Bitmap(path + “Picture1.jpg”);
IPPImage imgx = presentation.Images.AddImage(image);
// Add Picture Frame with height and width equivalent of Picture
IPictureFrame picFrame= slide.Shapes.AddPictureFrame(ShapeType.Rectangle, 50, 150, imgx.Width, imgx.Height, imgx);
//Create sequence of effects for this button.
var seqInter = presentation.Slides[0].Timeline.MainSequence.AddEffect(picFrame, EffectType.Blinds, EffectSubtype.Vertical, EffectTriggerType.OnClick);
seqInter.Timing.Speed = 3.0f;
// Write the PPTX file to disk
presentation.Save(path + “RectPicFrame.pptx”, SaveFormat.Pptx);
}