Remix.run Logo
jvanderbot 5 days ago

PNG keeps a count of sequentially-same color pixels (not really but roughly speaking) instead of keeping pixels themselves. So scaling a monocrome png image means just changing the count entry (very roughly speaking), so it'll be nearly zero cost.

What I mean is, if you have a million pixels of the same color (0xDEADBEEF maybe), then PNG will call that 1,000,000 x OxDEADBEEF. So, it scales very nicely for few-color, sparse or "blocky" images.