# Let it snow!

DevFeed: [Let it snow!](<https://devfeed.tech/articles/let-it-snow-15746.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/let-it-snow>)

Author: Square Engineering

Published: 2013-12-19T17:05:00Z

Content type: tutorial

Language: en

Sources: [Square Corner](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [Image](<https://devfeed.tech/topics/image.md>), [90s web design](<https://devfeed.tech/topics/90s-web-design.md>), [HTML](<https://devfeed.tech/topics/html.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [alpha](<https://devfeed.tech/tags/alpha.md>), [animation](<https://devfeed.tech/tags/animation.md>), [animations](<https://devfeed.tech/tags/animations.md>), [bits](<https://devfeed.tech/tags/bits.md>), [bob](<https://devfeed.tech/tags/bob.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [cache](<https://devfeed.tech/tags/cache.md>), [challenges](<https://devfeed.tech/tags/challenges.md>), [code](<https://devfeed.tech/tags/code.md>), [color](<https://devfeed.tech/tags/color.md>), [compression](<https://devfeed.tech/tags/compression.md>), [custom](<https://devfeed.tech/tags/custom.md>), [design](<https://devfeed.tech/tags/design.md>), [diffs](<https://devfeed.tech/tags/diffs.md>), [displays](<https://devfeed.tech/tags/displays.md>), [email](<https://devfeed.tech/tags/email.md>), [email-clients](<https://devfeed.tech/tags/email-clients.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [era](<https://devfeed.tech/tags/era.md>)

## AI overview

Square Cash's holiday email snow animation was built as an animated GIF because most email clients did not support HTML5. The Java renderer uses four snowflake layers to create depth, with only the closest layer traveling the full image height; the others travel shorter distances and repeat, reducing the animation from 240 apparent frames to 60. To reduce file size, the team precomputed a 16-color palette with pngquant's Median Cut quantization and encoded at 4 bits per pixel. Tests of frame-difference images produced larger files because they compressed less effectively than full frames. The resulting animation was under 650 KB, though the article notes that 4-bit encoding can sometimes yield a larger file than 8-bit, depending on image content.

## Source excerpt

Square Cash makes gift giving a little more festive.