Aspose.PSD Animation Maker for .NET

Aspose.PSD Animation Maker for .NET is a specialized library designed for developers who need to create, edit, and export animations from Photoshop (PSD) timelines. With full access to timeline layers, frames, and animation properties, it provides unmatched control for building professional animations programmatically within .NET applications.


Installation and Setup

  1. Add the NuGet package Aspose.PSD to your .NET project:

    dotnet add package Aspose.PSD
  2. Refer to the official Installation Guide for detailed setup instructions.

  3. Configure Metered Licensing at application startup to unlock full functionality.


Key Features and Functionalities

1. Timeline Layers Management

  • Enumerate and access all layers in a PSD timeline.
  • Add or remove layers dynamically while preserving the PSD structure.
  • Reorder layers to adjust stacking (z-index) and visibility.
  • Control opacity, blend modes, and positioning at specific keyframes.

2. Frame Control and Editing

  • Insert, delete, or clone frames within the timeline.
  • Adjust frame delays for precise animation timing.
  • Apply frame-specific transformations and visibility rules.
  • Tween between keyframes for smooth transitions.

3. Animation Playback and Preview

  • Render timeline animations in memory for quick previews.
  • Control playback (loop count, playback speed, starting frame).
  • Extract individual frames as raster images.
  • Overlay debugging information via rendering events.

4. Export and Output Formats

  • Export animations to GIF, MP4, WebP.
  • Configure encoder settings: frame rate, compression, loop behavior.
  • Export directly to disk, memory streams, or custom outputs.
  • Preserve PSD effects, masks, and blending in rasterized frames.

5. Integration with PSD Core Features

  • Retain smart objects, masks, adjustment layers, and blend modes.
  • Combine animation with PSD editing workflows (resize, crop, filter).
  • Leverage PSD color profiles and text/vector rendering for fidelity.

Tips and Best Practices

  • Always dispose of PsdImage objects to free unmanaged resources.
  • Use cloned PSD instances for non-destructive edits.
  • Stream frame exports in batches for large timelines.
  • Experiment with encoder settings for optimal quality vs. file size.
  • Organize timeline layers using layer groups and naming conventions.
  • Preview animations in headless mode before UI integration.

Code Example: Creating and Exporting an Animation

// Load PSD with effects
var loadOptions = new PsdLoadOptions() { LoadEffectsResource = true };

using (PsdImage psdImage = (PsdImage)Image.Load(@"C:\Samples\input.psd", loadOptions))
{
    Timeline timeline = psdImage.Timeline;

    // Modify frame 2
    timeline.Frames[1].Delay = 15;
    timeline.Frames[1].LayerStates[1].Opacity = 50;

    // Move layer in frame 3
    timeline.Frames[2].LayerStates[1].PositionOffset = new Point(-50, 230);

    // Add a new frame
    var frames = new List<Frame>(timeline.Frames);
    frames.Add(new Frame());
    timeline.Frames = frames.ToArray();

    // Change blend mode in frame 4
    timeline.Frames[3].LayerStates[1].BlendMode = BlendMode.Dissolve;

    // Export animation as GIF
    timeline.Save(@"C:\Samples\output.gif", new GifOptions());

    // Save updated PSD
    psdImage.Save(@"C:\Samples\output.psd");
}

Advanced Features

  • Fine-tune frame delays, blend modes, and transitions.
  • Support for multi-layer and multi-frame animations.
  • Optimized for large PSD files and complex timelines.
  • Real-time in-memory previews before final export.
  • Full support for PSD/PSB editing, ensuring compatibility with Photoshop files.

Supported Formats

  • Input: PSD, PSB, PNG, TIFF, JPEG, BMP, GIF
  • Output: PSD, PSB, Animated GIF, MP4, WebP

Use Cases

  • Web Development: Create GIFs for UI animations.
  • Advertising & Marketing: Generate dynamic ads and banners.
  • E-commerce: Animate product displays.
  • Game Development: Build sprite animations from PSD assets.
  • Software Demos: Showcase workflows via animated previews.

Frequently Asked Questions

Q1: How is the Animation Maker different from Aspose.PSD for .NET? The Animation Maker focuses specifically on timeline-based animation editing and exporting, while Aspose.PSD for .NET provides a broader PSD editing toolkit.

Q2: Which formats can I export animations to? You can export animations to GIF, MP4, WebP, PSD, and PSB.

Q3: Can I create animations from scratch? Yes, you can generate new PSD/PSB files, add timeline layers, and build animations programmatically.

Q4: Does it support multi-layer animations? Yes, full support for complex, multi-layer, and multi-frame animations with blending and effects.

Q5: Is it suitable for marketing and e-commerce? Absolutely. You can create product animations, banners, and GIF ads directly from PSDs.

 English