Open konsumer opened 1 month ago
As another test, I tried not dithering at all, and just running the same frames through the input, resize & output pipelines, and it seems to have the same issue.
Also, some (most) images are fine, it's just this Voltron image, in my testing. For example, this turns out exactly as expected:
Testing your gif above, it does seem to render fine for me. Have a look in https://github.com/matt-way/gifuct-js/blob/master/demo/demo.js to see how some basic rendering is done. I suspect the problem has something to do with treating each frame individually, and not as patches over the gif itself.
I suspect the problem has something to do with treating each frame individually, and not as patches over the gif itself.
I think so too. The display works fine on a canvas (since it patches to the same canvas.) Maybe on each frame, I should grab a copy of previous frame first.
Hi, first thanks for making this very useful library.
I am working on a tool to turn a gif into code for display on an OLED. You can see the tool here. For the most part it works pretty well. Basically I use gifuct to load the gif, split it into canvases for each frame, then apply a dither, then from there output different kinds of code.
I noticed that some gifs have issues, like this:
input
output
The issue is what looks kinda like lightning when the Voltrons are dancing.
At first I thought it was the gif output lib I am using gifenc, because I didn't see the problem on the preview-canvas, but I tested the outputted code on a real OLED, too, and it showed up. I figured it was a problem with transparency, so I tried filling the canvas before drawing, and it made the problem show up on the preview-canvas as well. I also tried adding
{alpha: false}
to the context, which did not seem to help.Here is how I load it:
Do I need to do something else to make sure it's a complete no-transparency frame?