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

white rectangles when decoding certain color tables #33

Open
d3v-null opened this issue Oct 11, 2021 · 1 comment
Open

white rectangles when decoding certain color tables #33

d3v-null opened this issue Oct 11, 2021 · 1 comment

Comments

@d3v-null
Copy link

Hi there!
I have a gif, which displays correctly in most programs or browsers I've used, however when I open it with gif-animation, white rectangles appear in different places on the gif as the animation progresses. I believe there is an issue decoding the image.

Here is the gif and the example code I used to test if it was working (based off the gifDisplay example, just move the mouse around to go between frames).

import gifAnimation.*;

PImage[] animation;
Gif loopingGif;
Gif nonLoopingGif;
boolean pause = false;

public void setup() {
  size(480, 480);
  frameRate(100);
  
  println("gifAnimation " + Gif.version());
  animation = Gif.getPImages(this, "Cl8NHgAB1cTnIuJRT5.gif");
}

void draw() {
  background(255 / (float)height * mouseY);
  image(animation[(int) (animation.length / (float) (width) * mouseX)], width - 10 - animation[0].width, height / 2 - animation[0].height / 2);
}

original gif (notice the lack of white boxes):

Cl8NHgAB1cTnIuJRT5

what it looks like in gif-display:
ezgif-4-2311754a7b3e

Any ideas?

Cheers.

@d3v-null
Copy link
Author

When I use the ezgif optimization called "Single color table for all frames", it seems to fix this!

https://ezgif.com/optimize/ezgif-4-f13e01875851.gif
ezgif-4-6107d24951ba

@d3v-null d3v-null changed the title white rectangles when decoding certain gifs white rectangles when decoding certain color tables Oct 11, 2021
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

1 participant