-1

The image I'm trying to manipulate

So in a web browser this image looks exactly like I want (at least on mine) and the left slice of the image in the latter half of the animation is transparent.

However in discord and in windows photo viewer (and probably a few other apps) the transparency is replaced with a black or white background.

I've made other gifs with transparency that display fine in all apps and I can't for the life of me figure out what's so special about this one.

Pointers appreciated

Edit: hopefully this screen capture makes clear the problem: https://youtu.be/hIrrnUOYGfo

  • Hi. Weclome to GDSE. Not all image viewers support GIF transparency. The Windows 10 Photos app is one of those. GIFs are designed to be used in web pages, and viewed in browsers. – Billy Kerr Dec 25 '19 at 10:29
  • @Billy Ker this is factually false. I have other gifs that don't show the same behavior and show the same Grey or white background of the app displaying them (light or dark mode) – Assimilater Dec 25 '19 at 16:23
  • 1
    Would you have a link to the other GIF? – xenoid Dec 25 '19 at 17:12
  • 1
    Plot twist: a de-optimized version displays differently (checkerboard) in one of my viewers when the optimized version has a solid white background. – xenoid Dec 25 '19 at 17:26
  • Let me make this clearer. There's nothing wrong with the GIF. It works perfectly in a web browser. The problem lies with the viewers you are using. – Billy Kerr Dec 25 '19 at 17:53
1

Using ImageMagick's identify -verbose command and comparing the original version against a version un-optimized in Gimp (Filter>Animation>Unoptimize)

  1. The original version doesn't show an alpha channel in the first frame, while the Gimp one does. The alpha channel is of course necessary to support transparency.
  2. The original version as a comment that reads: Optimized using ezgif.com so the problem has likely nothing to do with Gimp.
  3. Re-optimizing the un-optimized version with Gimp (Filters>Animation>Optimize (for GIF)) seems to produce a version with transparency. However, GIMP 2.10 has a bug (frames move to the left) while Gimp 2.8 does a correct job:

enter image description here

  • Hmm, the version of gimp I'm using is 2.8.20. Turns out the problem was the first frame not having an alpha channel, even though all the other ones do – Assimilater Dec 25 '19 at 18:16
0

Until our displays are a sheet of transparent glass, all images are displayed above a background that shows through the transparent parts of the image. Outside of web pages, where the background shall be whatever is rendered in layers below the image, what that background looks like is fairly arbitrary and depends on the image viewer. Gimp (like some others) uses a checkerboard pattern (by default, because you can change that...), Firefox uses a light gray (230,230,230), Chrome uses black.

The simple fact that different viewers render that part differently is the clue that it is transparent, otherwise they would render it with its actual color and that would the same for all viewers.

  • Uh...ya that's how transparency is supposed to work. But instead of matching the background they are placed over (take discord for example which I have in dark mode so it's a dark gray background) the images show something else (in this example white) – Assimilater Dec 25 '19 at 16:25
  • Conversely in windows photo viewer instead of the dark gray background of the app it shows pitch black – Assimilater Dec 25 '19 at 16:26
  • Edited my question with a screen capture video – Assimilater Dec 25 '19 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.