NPS Image Editor supports basic frame animation including the ability to load and saveanimated GIFs.
Animation is achieved by showing and hiding layers in sequence, including combinations of layers.
A "frame" refers to the visible state of the animation and can consist of one or more visible layers.
When "Display Layers as Frames" is checked, there is no difference between a layer and a frame.
Enabling animation
Use the Image -> Enable Animation command to turn on animation for your image. This will give you access to animation options
and will allow you to save the resulting file as an animated GIF. If you open an existing animated GIF, this will be done automatically.
Animation toolbar
When animation is enabled, a toolbar will appear with several commands.
Reset Animation
Keyboard shortcut: Ctrl+Home
Resets the animation to the beginning. This will hide all layers except the background.
Previous Frame
Keyboard shortcut: Ctrl+PgDn
Moves to the previous frame.
Next Frame
Keyboard shortcut: Ctrl+PgUp
Moves to the next frame.
Play
Keyboard shortcut: Ctrl+Space
Starts playing the animation. Animation will play through until the end and stop, unless
Repeat is selected. You cannot edit the image while an animation is playing.
Pause
Keyboard shortcut: Ctrl+Space
Pauses the animation.
Repeat
If checked, the animation will repeat indefinitely. If unchecked, it will stop after reaching the end.
Note that this setting has no effect on how the GIF is saved. To adjust the number of repeats in the GIF, you
will need to go to Edit -> Properties and set the Loop Count on the Animation tab.
Editing frames
Use the Layer Properties dialog to edit each frame's delay and disposal method. These define how the animation is performed.
Frame delay
Specifies the amount of time, in milliseconds, that the current frame is displayed. Once the delay runs out, the next frame will be
displayed. Note that different browsers might interpret this value differently and very small values (i.e. below 60 ms) might appear
as much longer delays.
Frame disposal method
Specifies what happens to the current frame when the next frame is displayed. Note that the exact behavior also depends on the transparent
regions within the frame's image data; frame disposal is irrelevant for a fully opaque frame that fully covers the previous one.
Note that NPS Image Editor performs layered animation which is different from the GIF specification where only one frame at a time is
rendered. When playing back an animation
in NPS Image Editor, the behavior may differ from how a browser will display your animation when saved as a GIF, especially when frames
are smaller than the background.
Default
Depending on the browser, the entire frame will be replaced by the next frame, or will act the same as Combine.
NPS Image Editor will treat this the same as Combine.
Combine
The next frame will overlay the current frame. Any opaque pixels will cover the frame beneath it and any transparent pixels will show
the previous color.
Restore Background
The background layer replaces the current frame, then the next frame will combine with it.
(In the GIF standard, only the area occupied by this frame will be restored to transparency.)
Restore Previous
Similar to Restore Background, but replaces the current frame with the previous frame. This behavior also depends on the browser
implementation. (In the GIF standard, this will revert a combined set of frames if some were showing before the previous frame was initially displayed,
but this often does not make a meaningful difference since NPS will non-destructively restore the visibility of past layers.)
Operations
You can access operations for the entire animation under the Image -> Animation Operations menu.
Adjust all frame properties
Adjust Speed, Set All Frame Delay, and Set All Frame Disposal Method will apply the specified changes to all frames in one go.
Generate full frames (Unoptimize)
GIFs are often saved "optimized" to minimize file size. This allows you to create one large background frame and then layer smaller
frames on top of it that contain only the differences. In the case of converting a typical movie clip to GIF, this often leads to frames
that are difficult to edit due to "missing pixels".
Generate Full Frames (known as "Unoptimize" in many programs) will generate full-size frames from each optimized frame which
will make it easier to edit them. If your GIF has a global palette, the full-size frames will continue to use the global palette, otherwise
the frames will be converted to true-color mode.
Spinning an image
The Spin operation will take a single layer and rotate it in a full circle, generating as many frames as desired for the in-between states.