-
Notifications
You must be signed in to change notification settings - Fork 18
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
octree renders black pixels as transparent #11
Comments
The offending code seems to be findClosest(c). It always returns with a value that turns black pixels transparent in octree. EDIT: Or perhaps the octree algorithm turns transparent pixels black? |
@benjaminadk Any chance you could take a quick peek at this? |
I'm in the same boat here. This is definitely the function findClosest(c) that always returns -1. |
Oh lord it took me HOURS for this but I got mine working! here's what I did: script.js file
I commented this line in the GifEncoder.js library
Then proceed with generating
|
As long as setTransparent() isn't set to null, octree will render black pixels as transparent. For anyone else running into this issue, one workaround is to set the encoder to neuquant instead, which does not have this issue.
Bugged:
const encoder = new GIFEncoder(256, 256, 'octree', true);
Working:
const encoder = new GIFEncoder(256, 256, 'neuquant', true);
Caveat: In certain cases, neuquant colors will not be as accurate.
The text was updated successfully, but these errors were encountered: