# Loop animated .gif in python mode

**URL:** <https://discourse.processing.org/t/loop-animated-gif-in-python-mode/30479>\
**Category:** Processing.py\
**Created:** [June 3, 2021, 5:25pm UTC](https://discourse.processing.org/t/loop-animated-gif-in-python-mode/30479 "2021-06-03T17:25:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![JSGauthier](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jsgauthier/32/9910_2.png) [@JSGauthier](https://discourse.processing.org/u/JSGauthier)\
**Post date:** [June 3, 2021, 9:12pm UTC](https://discourse.processing.org/t/loop-animated-gif-in-python-mode/30479/3 "2021-06-03T21:12:32Z")

</div>

> [@Using gifAnimation library on Python Mode](https://discourse.processing.org/t/using-gifanimation-library-on-python-mode/24577/1):
>
> `gifAnimation` (Mac/Windows)

Thank you villares,  
This is exactly what I was seeking.

A note on the STEP 2 of the instruction above:

In order for the library to install correctly ensure you **rename the unzipped** Folder from _/gif-animation-3.0_ to **/gifAnimation**

I made a simple python example using the included “lavalamp.gif” file for anyone interested.

```auto
// JSGauthier
// Make a .gif loop using the gifAnimation library in python mode.

add_library('gifAnimation')

def setup():
    size(1000,1000)
    global G
    G = Gif(this, "lavalamp.gif")

def draw():
    background(0)
    G.loop()
    imageMode(CENTER)
    image(G, mouseX,mouseY)

```

---

_[View the full topic](https://discourse.processing.org/t/loop-animated-gif-in-python-mode/30479)._
