BraulioVM/tulip

Support GIF animations

Opened this issue · 1 comments

It would be awesome if tulip supported gif animations.

I have built a PoC of this feature and I'm afraid it is too slow. Having to recalculate the whole grid every time a new frame is displayed is too expensive. Some solutions I'm thinking could work:

  • GIF files do not need to store the whole image for every frame. New frames can use information of the previously loaded frames. This means that the whole grid may not need to be calculated in order to show a new frame. I have to look into how Pillow can help me optimize this
  • Using multiple threads concurrently to calculate the grid. This could be benefitial if and only if accessing pixel information using Pillow requires disk access.
  • Using paralellism: paralellism is not python's forte (because of the GIL) but some options could be looked into.
  • Using C++ to calculate the grid for each frame: this could improve things a lot, but the project would certainly become much more complex.