by enhray · 8y ago · 0 comments
Some kind of memoisation scheme might work though.
Of course, if you want to compute the lookup table dynamically on each run, you might use memoization and hope the image is either small (and therefore uses comparatively few colors) or large with few actual colors in use.