An APNG can show a full-size animation even when some stored frames contain only a small patch. The PNG header sets the size of the canvas. Each animation frame then describes a rectangle, its position and how it interacts with the canvas. The player displays the complete result, keeps it on screen for the frame delay, and applies a disposal instruction before the next update.
The easiest way to see why this matters is to put a brief glow over a detailed background. The file can store the background once and update the glow in a small rectangle. To animate that glow cleanly, the player needs to know where the patch goes, whether transparent pixels preserve earlier content and what to restore when the frame ends.
The PNG header and frame control describe different rectangles
The W3C PNG specification uses the dimensions in IHDR for the full canvas. An animation control chunk, acTL, identifies the animation and its frame count and play count. A frame control chunk, fcTL, gives an individual frame its width, height, offsets, delay, blend method and disposal method. The frame rectangle must fit inside the canvas.
The numbers describe two views of the file. A 12 by 12 frame rectangle can update one corner of a 32 by 32 canvas. The player shows the resulting 32 by 32 picture. A tool that displays only the stored patch can show a 12 by 12 glow with no lighthouse, even though the complete animation always shows the lighthouse in that spot. Both views can be correct for what they are showing.
Use a simple example where the first frame draws a full 32 by 32 lighthouse scene. The second blends a small amber glow near the top of the lighthouse. The third adds a small glint lower down on the water. The rest of the display comes from the canvas already built by earlier updates.
A large and a small frame can each be visible for the same length of time. Frame delay governs how long the composed result remains visible. The rectangle governs what region the frame can change. Keep those two controls separate when checking an animation exported with optimized frame bounds.
A transparent patch can preserve or replace what is already there
APNG frame control defines SOURCE and OVER. SOURCE replaces all pixels inside the frame rectangle with the incoming pixel values, including transparent pixels. OVER composites the frame onto the canvas using the incoming alpha values. With OVER, a fully transparent part of the patch leaves the existing canvas visible there.
In the lighthouse example, an amber glow with transparent corners can use OVER to keep the blue sky and the outlines beneath those corners. If the same patch is used with SOURCE, those corners are replaced by transparent pixels. A background outside the animation might show through. The patch has the same size, position and timing in both cases. Its blend method changes what appears inside that rectangle.
The MDN image format guide describes APNG as an animated extension of PNG. Knowing that a file supports alpha is only part of the question. If an area turns clear or shows a dark square during an animation, look at the patch pixels and the blend choice together. Alpha describes the incoming pixel. Blending describes what that pixel does to the current canvas.
The player can restore the earlier canvas after a frame ends
Disposal controls what happens after the composed frame is shown and before the next frame is drawn. NONE leaves the frame's result in place. BACKGROUND clears the area occupied by that frame to transparent black. PREVIOUS restores the canvas region to what it was before that frame was drawn. The last two can look very different when a patch overlaps an opaque backdrop.
Set the brief amber glow to PREVIOUS in the lighthouse example. Once its delay ends, the affected rectangle returns to the lighthouse and sky as they were before the glow. The small water glint can then appear without leaving the amber patch above it. If the glow uses NONE instead, it can remain when the glint arrives. If it uses BACKGROUND, the patch area is cleared, which can remove the original scene there until it is redrawn.
This order matters even when the frame being inspected looks fine. The visible problem may first appear on the following frame. For example, a transparent hole after a glow can come from disposal of the earlier glow rather than the pixels in the current update. Our guide to why moving pixel artwork can leave trails describes a related symptom in GIF. APNG uses its own named frame controls and canvas rules.
The PNG specification initializes the output canvas to transparent black at the start of each play. It also gives first-frame PREVIOUS a special treatment equivalent to BACKGROUND, since there is no preceding frame to restore. For an export that looks right on the first pass but wrong near the loop boundary, check the initial frame and the repeat separately from what disposal does between the second and third frames.
A still PNG view can show a default image without playing the updates
A PNG file includes a default image. In APNG it can be the first frame of the animation or a separate fallback still. In the former case, the frame control for that first image comes before the IDAT image data. When the default still is separate, the animation's first frame control appears after the default image data. Subsequent animation image data is carried in fdAT chunks. That arrangement lets a PNG-only viewer show a valid still.
A single still on a device therefore tells you little about whether the file contains updates. The Apple Image I/O PNG property reference exposes APNG-specific properties, including loop and delay values, in a decoder that reads them. Use an animation-aware viewer to check the changing lighthouse and water patches, and confirm the destination's own import behavior separately.
The Divoom Pixoo-Max is an example of a compact square pixel display. Its documented grid gives you a target size for the lighthouse artwork. A still preview of the motif can be useful while planning the frames. The ability to show that still or the product's app animations does not establish APNG import.
Display LED Pixel Art Divoom Pixoo-Max 32x32 per l'arredamento della stanza Divoom Pixoo-Max 32x32 pixel art LED display for room decor and gaming setups. App-controlled custom animations, smart widgets, and community designs. €92,95 EUR Buy now
Keep a copy of the export and check the first visible animation frame, the glow, the restored patch and the next glint in order. Also open it as a still where relevant. A useful delivery check tells you both what the animation does in a capable viewer and what a destination actually plays.
One practical record is a row for each visible frame with its rectangle, blend, delay and disposal. Note what is on the canvas immediately before each update. That record often makes an unexpected mark easier to trace than stepping through a list of thumbnails that show only the stored patches.
FAQs About APNG Canvas and Frame Updates
Can an APNG frame be smaller than the final animation?
Yes. A frame can carry a rectangle within the full canvas. The frame's offsets tell the player where to compose it.
What is the difference between SOURCE and OVER?
SOURCE replaces the frame rectangle, including transparent pixels. OVER composites the incoming pixels over the existing canvas using alpha.
Does clearing a frame restore the old picture?
BACKGROUND clears the affected region to transparency. PREVIOUS restores the region to its pre-frame state. Those produce different results over an opaque background.
Why can a PNG viewer show only one image from an APNG?
It may show the default PNG image while ignoring the animation chunks. The default still can be part of the animation or separate.
Does a frame's size determine its display time?
No. The frame rectangle and its delay are separate. A tiny update can remain visible for much longer than a full-canvas frame.
Conclusion
Follow the canvas over time. The player places a rectangle, blends it, shows the composed picture and applies disposal before drawing the next frame. That sequence explains why an APNG can use small updates and still produce a complete image at every step.
