-
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
setTransparent #6
Comments
I have the same problem. For everything else it works fine |
I just found the solution.
This appears to be of type boolean and you can assign the value 1 or better yet the value true After writing all the above I realized that none of this is necessary, there is a simple method to change this value without having to touch the library
|
@MiguelArenasVillalobos brilliant, i’d been looking closely for that |
Still an issue. Doesn't seem to allow me to define what color is actually transparent. Currently turns all black pixels transparent. |
Same issue here! How to select the transparent color? |
I'm using: import GIFEncoder from 'gif-encoder-2';
/* some code skipped... */
const encoder = new GIFEncoder(width, height, 'neuquant', true, totalFrames );
CODE: encoder.setTransparent(true) IS WRONG. This is because But here is a "catch": That is why this CODE: encoder.setTransparent('#52ff5d') IS WRONG.
---- SOLUTION ----CODE: encoder.setTransparent('0x52ff5d') IS GOOD 👍
var r = (c & 0xff0000) >> 16
var g = (c & 0x00ff00) >> 8
var b = c & 0x0000ff where |
Looks like this method doesn't work anymore. Is that because of the new encoder?
The text was updated successfully, but these errors were encountered: