napari / napari-animation

A napari plugin for making animations
https://napari.github.io/napari-animation/
Other
74 stars 27 forks source link

Problems with .gif animation output #172

Closed GenevieveBuckley closed 8 months ago

GenevieveBuckley commented 1 year ago

While working on https://github.com/napari/napari-animation/pull/171, I found that gif animations output from napari-threedee do not play back correctly for me.

To reproduce:

  1. Take one of the example code scripts, like animate2D.py, and
  2. Change the ".mov" extension to ".gif" in the line that runs the animate method, then run the example file
  3. Try to open the gif file (eg: in a browser like Chrome) and observe that you only see a single static frame, not the movie playback. Opening other gifs (not produced with napari-threedee do not show this problem)

Other details:

psobolewskiPhD commented 9 months ago

Hi @GenevieveBuckley Can you clarify this issue? what exactly is napari-threedee being used for?

Also, there's currently two open issues related to this: 1: labels animations: https://github.com/napari/napari-animation/issues/180 2: animated gifs: https://github.com/napari/napari-animation/issues/174 This one has been fixed upstream, for the time being.

Is this issue triggered by one of those? Given that 2 is fixed in my env, I used the branch that fixes nr 1 above: https://github.com/napari/napari-animation/pull/181 and then modified the example you linked to output a gif. With that I have no problems with it autoplaying in Chrome--but I don't have napari-threedee. Should I?

psobolewskiPhD commented 8 months ago

Ok, I think I tracked this down. imageio issue: https://github.com/imageio/imageio/issues/974 It's been fixed upstream, so if you update your imageio (or make a new env), then it should work. I'm going to close, but if you if hit this again, feel free to reopen with more info.