Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Export webp with transparent background
#1
I'm trying to export a multi-layered, animated .xcf which is a POAP (Proof of Attendance Protocol).

I've flattened the layer groups into 6 layers and converted the image from RGB mode to indexed color mode.

In 'GIMP > Filters > Animation > Playback' the animation runs smoothly with a transparent background.

I just cant figure out how to export the animation and preserve the transparency.

I either get animation with a white background (no transparency) with .webp, or no animation but transparency preserved with .png.

I just can't seem to figure out which setting I've got wrong.

I'm using GIMP 2.10.30 on Windows 10 Pro.
Reply
#2
Works for me with WebP.... Are you sure that the white background is part of the image and not added by the image viewer? Can you attach an example XCF and WebP?
Reply
#3
I had never created a file in this format (webp) before.
There's always a first time!

But with me the same thing described by the OP is happening.
When opening the file in the browser (Chrome) the background appears in white and not in transparency.

PS:

Hmm, saving as .gif does the same; displaying white and not transparency.

I tested by opening both files in Chrome and Firefox.
In Gimp it opens as expected, with transparency.
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply
#4
It is the viewer. This a one layer 'X' on transparency.

   

Left to right: Shown in a web browser - a dedicated webp viewer - XnViewMP
Web browser does not show transparency, there will be others.
Reply
#5
(04-30-2022, 03:19 PM)Krikor Wrote: I had never created a file in this format (webp) before.
There's always a first time!

But with me the same thing described by the OP is happening.
When opening the file in the browser (Chrome) the background appears in white and not in transparency.

PS:

Hmm, saving as .gif does the same; displaying white and not transparency.

I tested by opening both files in Chrome and Firefox.
In Gimp it opens as expected, with transparency.

Works for be with both chromium (transparency rendered on black) and Firefox (transparency rendered on gray) and Gwenview (transparency rendered on checkerboard). In each viewer get the same kind of transparency for both animations (webp/gif) and still pictures (png).
Reply
#6
(04-30-2022, 06:52 AM)Ofnuts Wrote: Works for me with WebP.... Are you sure that the white background is part of the image and not added by the image viewer? Can you attach an example XCF and WebP?

The flattened, optimized .xcf file is 11+ meg, I get upload errors (too large for this forum?) How does the forum handle large files, is there an app I can link to?


Attached Files Image(s)
   

.webp   POAP_AcrossProtocol-AMA_#3-flatfile.webp (Size: 209.78 KB / Downloads: 114)
Reply
#7
You can upload up to 2MB for an XCF, 500K for other types (see the Attachments link at the top of this page). But you should be able to demonstrate the problem with a smaller file (Image > Scale image, or many less layers).
Reply
#8
Ok, I got it.
Thx guys!
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply
#9
(04-30-2022, 06:37 PM)Ofnuts Wrote: You can upload up to 2MB for an XCF, 500K for other types (see the Attachments link at the top of this page). But you should be able to demonstrate the problem with a smaller file (Image > Scale image, or many less layers).

I've attached the smaller .xcf, its  exported .webp, and an image of my .webp export options.


Attached Files Image(s)
   

.xcf   POAP_AcrossProtocol-AMA_#3-flatfile-forum.xcf (Size: 1.79 MB / Downloads: 138)
.webp   POAP_AcrossProtocol-AMA_#3-flatfile-forum.webp (Size: 63.11 KB / Downloads: 121)
Reply
#10
Woodsmoke, I sincerely do not believe that the problem you are experiencing is a result of any mistake you made in authoring the image.

I've played around with several variables, and I've noticed that I experience the same problem as you if I use a recently updated browser AND try to open the file directly on my machine.  However, if I upload that same image to an online host....then it displays properly in the very same browser.

Here is where it gets interesting. If I take that exact same image and open it directly on my machine, but using an out of date browser, then it displays fine.

Look at the following it's the very same image on both sides...but on the left it's opened with Firefox 97.0.1   while on the right it's opened with chrome 72. something,.

[Image: d0iTWgj.png]

Try uploading your image to an online host, and see if your problem goes away.

For me it works fine as a .webp at either imgbb or at  postimage.org......and just to verify I exported the same image as a .gif and uploaded it to imgur   and in all instances the transparency was just fine.

So. its not a matter of the transparency being "white", at least not in my experiences


Reply


Forum Jump: