Wallpaper Engine

Wallpaper Engine

View Stats:
llefty Jan 10, 2021 @ 3:33am
Transparent gifs not importing correctly
I'm attempting to make some animated wallpapers using pixel art gifs which I've exported from GIMP. Each gif has an area of transparency around it to allow for a color-customizable background within Wallpaper Engine. The gifs play perfectly when I open them in other programs, but when I import them into Wallpaper Engine's editor their transparency only works for the first frame of the animation (the rest of the frames become opaque).

I've tested other gifs with transparency that import properly and behave as expected, but the only way I can get mine to work is by changing their frame disposal method to "combine" instead of "replace". However, this obviously messes up the animation significantly.

The weirdest part is, all of my currently-published wallpapers were exported/imported using the same GIMP and Wallpaper Engine settings, and I never had any problems when I created them ~6 months ago. However, when I try to import the same gifs that I used to create those old wallpapers, they suffer from the same issue as the gifs I'm currently trying to import. Has Wallpaper Engine changed the way it handles transparency since then, leading to this issue? Or am I just exporting/importing my animations using the wrong settings?
Last edited by llefty; Jan 10, 2021 @ 3:36am
Originally posted by Biohazard:
I found this GIF from your old wallpapers: https://64.media.tumblr.com/5c4ee2d6018bb3eda00d1d5e63a4379a/8df19d46ff474e40-6b/s500x750/1592940e6dd6504c802509618656968facb22f10.gifv

I looked at this file and it uses a couple of rarely used features and behaviors which are just unnecessary too. The reason it worked before in Wallpaper Engine is that the method it uses was just completely bugged before and now it does what the GIF tells it to do, which makes it look wrong.

Looking at several transcripts of the GIF specification I cannot find an explanation why it should be transparent on frame 2 and later. It may be that other applications include some kind of hack for this unspecified behavior or that they also are doing something that isn't correct according to the GIF format, just like Wallpaper Engine was doing before.

But the GIF literally says this:
1. Set background color to red, transparent
2. Clear with background color
3. Draw first frame
4. Set background color to red, opaque
5. Clear with background color
6. Draw second frame on top of background color

So this GIF really says that it wants to turn the background red by clearing it like this. Step 4 is what seems to be the most wrong, why would it specifically make the color opaque?

I imported this GIF into GIMP and exported it again and it just made everything worse. Now the background is *never* transparent in the GIF file and only fully white, I don't see why GIMP would do that.



I also imported and exported it with Photoshop and now the GIF is well formed. The background is transparent and does not get changed anymore. This is how it should be, now it also works in Wallpaper Engine.

I don't know why the malformed GIF works in other programs, I can only assume they have some hack to ignore the background color and make it always transparent when certain conditions are met, but I cannot find any information on this so it would be a really bad idea to attempt creating any hacks without knowing the full extent of the side effects.

TL;DR: The GIF file is defective according to the official GIF specification. Importing/exporting with Photoshop seems to fix the GIF.
< >
Showing 1-4 of 4 comments
Biohazard  [developer] Jan 10, 2021 @ 5:47am 
We are using the library stb_image which in itself has bugged GIF decoding. But it's surprisingly difficult to find a library that isn't performing awfully or bloated or buggy. We have already applied a number of fixes to their bugged GIF decoding.

Please share the GIF file because otherwise we have no reproduction case.

Maybe fixing this is easy but currently it works with the large majority of GIFs, this is the first time someone has an issue with the current way it works. So we might just have to wait for a 100% perfect fix by the developers of the library.

Also, Wallpaper Engine renders out the entire GIF, there is no need for not-so-well defined disposal methods since they become irrelevant after importing. You could even instead import a PNG sequence and get better colors for your animation.
Last edited by Biohazard; Jan 10, 2021 @ 8:01am
Tim  [developer] Jan 10, 2021 @ 5:57am 
Just as a follow-up to the post above: Please share the GIF file directly and not through an image host as they tend to alter GIF files. You can email it to logs@wallpaperengine.io.
The author of this thread has indicated that this post answers the original topic.
Biohazard  [developer] Jan 10, 2021 @ 11:51am 
I found this GIF from your old wallpapers: https://64.media.tumblr.com/5c4ee2d6018bb3eda00d1d5e63a4379a/8df19d46ff474e40-6b/s500x750/1592940e6dd6504c802509618656968facb22f10.gifv

I looked at this file and it uses a couple of rarely used features and behaviors which are just unnecessary too. The reason it worked before in Wallpaper Engine is that the method it uses was just completely bugged before and now it does what the GIF tells it to do, which makes it look wrong.

Looking at several transcripts of the GIF specification I cannot find an explanation why it should be transparent on frame 2 and later. It may be that other applications include some kind of hack for this unspecified behavior or that they also are doing something that isn't correct according to the GIF format, just like Wallpaper Engine was doing before.

But the GIF literally says this:
1. Set background color to red, transparent
2. Clear with background color
3. Draw first frame
4. Set background color to red, opaque
5. Clear with background color
6. Draw second frame on top of background color

So this GIF really says that it wants to turn the background red by clearing it like this. Step 4 is what seems to be the most wrong, why would it specifically make the color opaque?

I imported this GIF into GIMP and exported it again and it just made everything worse. Now the background is *never* transparent in the GIF file and only fully white, I don't see why GIMP would do that.



I also imported and exported it with Photoshop and now the GIF is well formed. The background is transparent and does not get changed anymore. This is how it should be, now it also works in Wallpaper Engine.

I don't know why the malformed GIF works in other programs, I can only assume they have some hack to ignore the background color and make it always transparent when certain conditions are met, but I cannot find any information on this so it would be a really bad idea to attempt creating any hacks without knowing the full extent of the side effects.

TL;DR: The GIF file is defective according to the official GIF specification. Importing/exporting with Photoshop seems to fix the GIF.
Last edited by Biohazard; Jan 10, 2021 @ 11:53am
llefty Jan 10, 2021 @ 6:20pm 
Originally posted by Biohazard:
I found this GIF from your old wallpapers: https://64.media.tumblr.com/5c4ee2d6018bb3eda00d1d5e63a4379a/8df19d46ff474e40-6b/s500x750/1592940e6dd6504c802509618656968facb22f10.gifv

I looked at this file and it uses a couple of rarely used features and behaviors which are just unnecessary too. The reason it worked before in Wallpaper Engine is that the method it uses was just completely bugged before and now it does what the GIF tells it to do, which makes it look wrong.

Looking at several transcripts of the GIF specification I cannot find an explanation why it should be transparent on frame 2 and later. It may be that other applications include some kind of hack for this unspecified behavior or that they also are doing something that isn't correct according to the GIF format, just like Wallpaper Engine was doing before.

But the GIF literally says this:
1. Set background color to red, transparent
2. Clear with background color
3. Draw first frame
4. Set background color to red, opaque
5. Clear with background color
6. Draw second frame on top of background color

So this GIF really says that it wants to turn the background red by clearing it like this. Step 4 is what seems to be the most wrong, why would it specifically make the color opaque?

I imported this GIF into GIMP and exported it again and it just made everything worse. Now the background is *never* transparent in the GIF file and only fully white, I don't see why GIMP would do that.



I also imported and exported it with Photoshop and now the GIF is well formed. The background is transparent and does not get changed anymore. This is how it should be, now it also works in Wallpaper Engine.

I don't know why the malformed GIF works in other programs, I can only assume they have some hack to ignore the background color and make it always transparent when certain conditions are met, but I cannot find any information on this so it would be a really bad idea to attempt creating any hacks without knowing the full extent of the side effects.

TL;DR: The GIF file is defective according to the official GIF specification. Importing/exporting with Photoshop seems to fix the GIF.
Thank you for the quick responses! I am actually not the original creator of these gifs (the pixel artist who made them simply gave me permission to use them), so I'm not sure what they did to create the gifs in such a messed-up way.

Regardless, importing/exporting them with Photoshop as you mentioned does seem to fix things, so that resolves my problem. Thanks again!
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Jan 10, 2021 @ 3:33am
Posts: 4