gif-animation
gif-animation copied to clipboard
white rectangles when decoding certain color tables
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):
what it looks like in gif-display:
Any ideas?
Cheers.
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