Skip to content
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

My png image has a transparent "hole" but won't show up as transparent #123

Open
HightonRidley opened this issue May 7, 2020 · 1 comment

Comments

@HightonRidley
Copy link

I have a png image with a hole that's transparent. When I add it as a frame, the hole is no longer transparent. How can I make it so it's transparent?
I've tried setting transparent: "rgba(0,0,0,0)" and also transparent: "#0x00000000" but neither work, eg:
gif = new GIF({
workerScript: "js/gif-maker-lib/gif.worker.js",
repeat: 0,
workers: 2,
width: 695,
height: 695,
transparent: "#0x00000000",
quality: 10
});

@cmann1
Copy link

cmann1 commented May 30, 2020

"#0x00000000" doesn't really make sense.
A CSS style hex string should be in a string in the form "#RRGGBB", eg. "#FF00FF"
And a "JS" style colour value should be 0xRRGGBB (this is just another way to represent an integer, so no quotes), eg. 0xFF00FF

The "transparent" option expects an integer, so change that line to
transparent: 0x00000000,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants