PsdImage.Timeline

PsdImage.Timeline property

Gets the Timeline of this PsdImage.

public Timeline Timeline { get; }

Examples

The following code demonstrates a new approach to work with the Timeline.

[C#]

string sourceFile = "4_animated.psd";
string outputFile = "output_edited.psd";

using (var psdImage = (PsdImage)Image.Load(sourceFile))
{
    Timeline timeline = psdImage.Timeline;
    
    // Add one more frame
    List<Frame> frames = new List<Frame>(timeline.Frames);
    frames.Add(new Frame());
    timeline.Frames = frames.ToArray();

    timeline.SwitchActiveFrame(4);

    psdImage.Save(outputFile);
}

See Also