Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Export webp with transparent background
(04-30-2022, 12:01 AM)WoodSmoke Wrote: I've flattened the layer groups into 6 layers and converted the image from RGB mode to indexed color mode.

If you export to animated webp, you DO NOT need to index the colors
WebP supports 24-bit RGB color with an 8-bit alpha channel, compared to GIF's 8-bit color and 1-bit alpha.

here you can visually see the difference ➤

Your file is transparent as well, have no worries about it, but when firefox open it as a "file" it shows a white background, but when the file is inside a real web page (with proper html/css) it will show the transparent background.

As a "file" it's this one (see below) which put the sh.t in Firefox ➤ ✅ background hsl blablabla.blabla.... in the css, uncheck it and you will see the transparency instead of the white BG Big Grin


or hover the image path with your mouse as below and you will see the checkers of transparency

There is nothing wrong with you Webp, it is transparent! Here it is in all its glory, displayed 6 different ways (all these images are actually animated, they are frozen by the screenshot):


  1. In my Gwenview image viewer
  2. In the "Preview" panel of my Dolphin file explorer
  3. Directly as a file in Firefox
  4. Directly as a file in Chrome
  5. In an <img src../> tag in an HTML file in Firefox. My default background is indeed yellow.
  6. In an <img src../> tag in an HTML file in Chrome.
Don't you think that if your Webp were not transparent we would see the same thing in all these browsers and in particular were would it catch my yellow background color?
Thanks for the inspiration, Ofnuts.   With a little help from the [background="X"]  tag:

[Image: 1uteF9w.png]

You're all the Best! Thank you all so much for the help. I should've thought of the browser inspector info.

I now see that there is nothing wrong with the file.

Forum Jump: