Animated gifs with clock overlaid

Hi Louis’

Am i right in using decoder.decodeFrame(); or am i looking in the wrong place?

So i have:

If (decoder.decodeFrame() == ERROR_DONE_PARSING) {
Serial.println(“END OF GIF”);
GIF(); // start gif decoder again
}

This works and prints when the gif ends just to tell me the IF is working but i think i need to disable the futertime timer ? otherwise my call to start the gif decoder again works fine but continues on with the futuretime timer until it times out…

Or am i on the wrong path?

Yes, you probably don’t need to use the timer if you just want to play each GIF one time.

Thanks for the help Louis, so far all good everything working as wanted…

Was curious to see if the indexedlayer brightness can be different to the background layer? Can it have its own brightness setting?

Currently the indexed layer doesn’t have it’s own brightness. I didn’t think it was necessary as you can use the overall brightness matrix.brightness() and background layer brightness in combination with each other. That won’t let you set a background brightness that’s brighter than the indexed layer, but do you really have a reason to do this? If you need to, you can just use an indexed color with smaller RGB values, e.g. to make red at 50% brightness, use {0x80, 0x00, 0x00 } instead of {0xff, 0x00, 0x00}.

If you really want a brightness control for the indexed layer, I’m curious to hear your use case.

Not so much a need no…i was working on getting the indexed layer to fade into the background and i thought it would be easiest with a brightness adjustment. But it looks like i can have the same effect by adjusting the RGB values like you say…

Thanks

Sounds interesting, can you describe this more or send a video after you get it working?

From your description, I can see brightness control being a useful feature to implement your effect, without having to do a bunch of math in your sketch. I’ll put this feature in the queue for a future release.

Gday Louis

For sure i’ll post a video and the code once i get it working correctly, im not very good at writing code but i do eventually work it out even if its not the best or most efficient way…

Thanks for your help
Daniel

1 Like