You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to make an image & GIF viewer using the python bindings for this library. Independently, I'm able to display images perfectly fine, same with GIFs. However when attempting to do one after another (specfically displaying a GIF after an Image), an issue occurs whereby the GIF plays for 1-2 cycles then momentarily show's the previous image. I suspect it maybe due to my implementation or a clash of matrix.SwapOnVSync and matrix.SetImage but even if I call matrix.Clear before displaying a GIF, it still glitches (momentarily shows a blank display).
and here is the snippet used for displaying GIFs (taken from the example in this repo)
def display_gif():
cur_frame = 0
print('GIF ✅')
while not gif_stop_event.is_set():
matrix.SwapOnVSync(canvases[cur_frame], framerate_fraction=5)
cur_frame = (cur_frame + 1) % num_frames
time.sleep(0.1) # Adjust the delay to match your desired frame rate
Thanks in advance
The text was updated successfully, but these errors were encountered:
I'm attempting to make an image & GIF viewer using the python bindings for this library. Independently, I'm able to display images perfectly fine, same with GIFs. However when attempting to do one after another (specfically displaying a GIF after an Image), an issue occurs whereby the GIF plays for 1-2 cycles then momentarily show's the previous image. I suspect it maybe due to my implementation or a clash of
matrix.SwapOnVSync
andmatrix.SetImage
but even if I callmatrix.Clear
before displaying a GIF, it still glitches (momentarily shows a blank display).here is the snippet used for displaying images
and here is the snippet used for displaying GIFs (taken from the example in this repo)
Thanks in advance
The text was updated successfully, but these errors were encountered: