Gimp-Forum.net
Export webp with transparent background - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Export webp with transparent background (/Thread-Export-webp-with-transparent-background)

Pages: 1 2


RE: Export webp with transparent background - PixLab - 05-01-2022

(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 ➤ https://gimplearn.net/viewtopic.php?p=40375#p40375

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

[attachment=7852]

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

[attachment=7853]


RE: Export webp with transparent background - Ofnuts - 05-01-2022

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):

[attachment=7857]

  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?


RE: Export webp with transparent background - rickk - 05-02-2022

Thanks for the inspiration, Ofnuts.   With a little help from the [background="X"]  tag:

[Image: 1uteF9w.png]


RE: Export webp with transparent background - WoodSmoke - 05-02-2022

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.