Skip to content
True Color Gif Generator
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.md
README.md
tcgif.go

README.md

tcgif

True Color Gif Generator

Why?

Just for kicks. I saw a similar demo many years back and was curious how hard it would be to reproduce.

How?

Gifs have a limited pallet of 255 colors, but that limit is per frame. Gifs also use transparency as a naive compression method such that the previous frame can show through. By utilizing this, we can in fact get 16 million colors in a single Gif!

todo

  • Less naive backfill. Track if the current backfilled color would be closer than a new one.

Samples

Description Image
No Backfill, Unsorted
tcgif -backfill=false -sort=false orig.jpg
Lenna, No Backfill, No Sort
No Backfill, Sorted By Popularity
tcgif -backfill=false orig.jpg
Lenna, No Backfill
Backfilled
tcgif orig.jpg
Lenna, Backfilled
Original Original
You can’t perform that action at this time.