-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to get color palette #3
Comments
Yes, the way that the GIF format is specified it is max 8-bit (256 color) indexed color. The palette is supplied in the GIF, so you must also supply it to omggif. There are many different color reduction / quantization algorithms that you can use for choosing a palette. This is really independent of omggif / gif encoding. I don't think there should be any problem using the above NeuQuant code w/ omggif, for example. Additionally you may also want to do dither, which is normally another independent pass. |
When I have some more time I planned on working on dithering / color quantization (for example spatial color quantization and other algorithms). This would be a separate project from omggif, but I realize it would be helpful here too... |
If you're going to monochrome 256 colors, there is no reason to dither. |
For anybody interested, here is OMGGIF working with NeuQuant.js in a worker: https://github.com/meemoo/iframework/blob/master/libs/omggif/omggif-worker.js Live test with webcam: http://meemoo.org/iframework/#example/cam2gif |
Is it true that we have to define and pass a color palette with each frame? Is there any chance that we could use something like https://github.com/antimatter15/jsgif/blob/master/NeuQuant.js to make the palette? (That project has some bugs with colors, but I don't know if it is in the quantization or the encoding.)
The text was updated successfully, but these errors were encountered: