# Processing 4.3 Display GIF Image?

**URL:** https://discourse.processing.org/t/processing-4-3-display-gif-image/42581
**Category:** Libraries
**Created:** [August 11, 2023, 9:22am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581 "2023-08-11T09:22:22Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![teemee](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@teemee](https://discourse.processing.org/u/teemee)
#### Post date: [August 11, 2023, 9:22am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/1 "2023-08-11T09:22:22Z")

</div>

I’d like to display a simple gif image. The PDE 3.x.x works with the library “gifAnimation”, as I recalled I have done it. But, PDE 4 does not work with the lib. Maybe, I just dont know how to make it work. So is there any solution or other lib for displaying gif image? it showed error (see comment) when I run the code.

I see there are examples in main processing “Examples” page but it used sequential image while my pictures are not individual images but one single compressed gif. So is there any work around on this issue?

Thank you in advance.

---

<div class="post-metadata">

### Author: ![teemee](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@teemee](https://discourse.processing.org/u/teemee)
#### Post date: [August 11, 2023, 9:24am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/2 "2023-08-11T09:24:36Z")

</div>

Also, this is an error I get when trying the former gifAnimation library.

```auto

java.lang.NoClassDefFoundError: gifAnimation/Gif
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
	at java.base/java.lang.Class.getConstructor0(Class.java:3578)
	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2754)
	at processing.core.PApplet.runSketch(PApplet.java:10068)
	at processing.core.PApplet.main(PApplet.java:9845)
Caused by: java.lang.ClassNotFoundException: gifAnimation.Gif
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 6 more
Could not run the sketch (Target VM failed to initialize).
For more information, read Help ? Troubleshooting.

```

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [August 11, 2023, 3:37pm UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/3 "2023-08-11T15:37:17Z")

</div>

> my pictures are not individual images but one single compressed gif

Have you tried loadImage()?

---

<div class="post-metadata">

### Author: ![teemee](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@teemee](https://discourse.processing.org/u/teemee)
#### Post date: [August 14, 2023, 10:27am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/5 "2023-08-14T10:27:29Z")

</div>

Yes:) It showed a still image no animation

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [August 14, 2023, 10:40am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/6 "2023-08-14T10:40:32Z")

</div>

Hello @teemee ,

With Processing 4.3 and W10 Pro the example provided with the library work:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/4/e4f08a4448ed0b8d9de18847dd89bdb2f6efd166.png)

It also worked with an animated GIF that I created with Movie Maker (comes with PDE).

`:)`

---

<div class="post-metadata">

### Author: ![teemee](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@teemee](https://discourse.processing.org/u/teemee)
#### Post date: [August 14, 2023, 10:53am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/7 "2023-08-14T10:53:39Z")

</div>

YES That’s what I talked about I used it but it did not work this time. gifDisplay shows errors as in my first comment. I am also working on Windows.

---

<div class="post-metadata">

### Author: ![teemee](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@teemee](https://discourse.processing.org/u/teemee)
#### Post date: [August 14, 2023, 10:55am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/8 "2023-08-14T10:55:38Z")

</div>

YES That’s what I talked about I used it but it did not work this time. gifDisplay shows errors as in my first comment. I am also working on Windows.

---

<div class="post-metadata">

### Author: ![teemee](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@teemee](https://discourse.processing.org/u/teemee)
#### Post date: [August 15, 2023, 9:09am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/9 "2023-08-15T09:09:46Z")

</div>

Update:

**On Windows 10 64-Bits with NVIDIA:** I have tried lower version of PDE to 3.5.4, gifAnimation still does not work. And, I read on Processing old forum that “Target VM failed to initialize” errors due to something with **nVidia**. While the solution suggested there was to download 3.5.x version instead of newer one, it does not work todays anymore. Anyone know any alternative solution? Thanks.

**On Mac 10.15.7** gifAnimation works fine on both PDE 3.5.4 and BETA 4.0. I have not tried on version 4 other than beta.

---

<div class="post-metadata">

### Author: ![teemee](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@teemee](https://discourse.processing.org/u/teemee)
#### Post date: [August 17, 2023, 5:22pm UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/10 "2023-08-17T17:22:14Z")

</div>

Can you tell me what graphic card does your computer use? Is it NVIDIA and what is the model and driver? Thanks!!

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [August 18, 2023, 7:02am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/11 "2023-08-18T07:02:34Z")

</div>

No Library Issue, relates to:

> [@Issue with every Contributed Libraries! Other ERROR and (Target VM failed to initialize)](https://discourse.processing.org/t/issue-with-every-contributed-libraries-other-error-and-target-vm-failed-to-initialize/42610/7):
>
> Hi @teemee, By renaming the two folders D:\OneDrive…\Processing → D:\OneDrive…\Processing\_bak C:.…\Roaming\Processing → C:.…\Roaming\Processing\_bak processing thinks on start, that it is its first start and newly creates and setup the sketchbook folder structure and as well the preferences… Ok! The issue is indeed based on the internationalization, resp. the thai named folder. I was able to reproduce it by creating a portable processing4 installation which sketch folder points to (X:.…\O…

I’ll close this topic!

Cheers  
— mnse

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [August 18, 2023, 7:03am UTC](https://discourse.processing.org/t/processing-4-3-display-gif-image/42581/12 "2023-08-18T07:03:50Z")

</div>


