Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
APNG
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== File format == The APNG specification follows the [[Portable Network Graphics#File format|PNG File format]] introducing three new ancillary chunks:<ref name="spec">{{Cite web |title=APNG Specification - MozillaWiki |url=https://wiki.mozilla.org/APNG_Specification}}</ref> * The animation control chunk (acTL) precedes the IDAT(s) of the default image and is a kind of "marker" that this is an animated PNG file. It also contains the number of frames and the number of times to loop the animation (0 meaning infinite). * The frame control chunk (fcTL) precedes each frame and contains its metadata : dimensions; position (relative to the default image); duration; if once over it is cleared to black, replaced by the previous frame or drawn over by the next frame; and if its transparency applies. * The frame data chunk (fdAT) storing frame's content. It starts with a sequence number, then has the same structure as the default image's IDAT chunk(s). Sequence numbers apply to both frame control and frame data chunks, which together follow a common sequence, thus enabling the order and timing of frames to be recovered should an APNG-unaware PNG editor re-order them as allowed by PNG chunk ordering rules.<ref name="PNG chunk">[http://www.libpng.org/pub/png/spec/1.2/PNG-Ordering.html Chunk Ordering Rules] (PNG 1.2 spec)</ref> Frames utilize the same bit depth, color type, compression method, filter method, interlace method, and palette (if any) as the default image. An application reading a PNG file is meant to ignore any chunks which it does not understand,<ref name="pngspec">{{Cite web |title=Portable Network Graphics (PNG) Specification (Second Edition) |url=https://www.w3.org/TR/PNG/}}</ref> making APNG [[Backward compatibility|backwards compatible]]. Applications without support for the APNG extension show only the first frame, disregarding additional animation frames. [[Image:Apng assembling.svg|frame|none|Diagram illustrating a possible way to assemble an animated PNG from three individual PNG files]] === Compression and optimization === A number of optimization techniques make APNG files as small as possible: [[Inter frame|Inter-frame]] optimization <ref>{{Cite web |title=Inter-frame Optimization in APNG |url=http://littlesvr.ca/apng/inter-frame.html |url-status=live |archive-url=https://web.archive.org/web/20140426100136/http://littlesvr.ca:80/apng/inter-frame.html |archive-date=2014-04-26 |access-date=2021-10-21 |website=littlesvr.ca}}</ref> utilizing [[Alpha Blend|alpha-blend]] and alpha dispose operations, smaller than the full-size subframes, dirty transparency, color type and [[Palette (computing)|color palette]] optimizations, and various compression options: [[zlib]], [[7-Zip]], [[Zopfli]].<ref>{{Cite web |title=APNG Assembler |url=https://apngasm.sourceforge.net/ |access-date=2021-10-21 |website=apngasm.sourceforge.net}}</ref> ===Derived formats=== Animated [[sticker (messaging)|sticker]]s for [[Signal (messaging app)|Signal]] are APNG with some restrictions (the size of the file is limited to 300kb, the length of the animation is limited to 3 seconds and, visibly (this last point is unclear), the resolution must be 512x512px).{{Which|date=January 2024}}<ref name="Signal">{{Cite web |title=Stickers |url=https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs |access-date=28 December 2021 |website=Signal Support |publisher=Signal |language=en}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)