When I export as a PDF it always turns transparent backgrounds of layers to white, no matter what I try.
So I have three visible layers. I select Layers as pages (bottom layers first), i also select Fill transparent areas with background color. I also have the background-color in the little square on the left side of the screen set to black. I have a visible layer in the layers-dialogue filled with black and labelled "Background", and placed at the bottom of the layers stack.
Yet still, any transparent areas in each layer will be filled with white. Deselecting Fill transparent areas with background color will still fill them with white also, as though it's disregarding that option altogether.
(08-24-2025, 09:59 AM)tomatoSauce23 Wrote: I'm using version 2.10.38 (revision 1)
...snip....
I have a visible layer in the layers-dialogue filled with black and labelled "Background", and placed at the bottom of the layers stack.
Yet still, any transparent areas in each layer will be filled with white. Deselecting Fill transparent areas with background color will still fill them with white also, as though it's disregarding that option altogether.
As Ofnuts points out the background color is not the same as the background layer. You can change the background color to black.
Also for Gimp 2.10.38 there is an old script which merges the background layer with all layers, originally meant for animations, looks like this: https://i.imgur.com/A39SdZZ.mp4
08-26-2025, 05:48 AM (This post was last modified: 08-26-2025, 05:49 AM by tomatoSauce23.)
(08-24-2025, 10:36 AM)Ofnuts Wrote: Works for me (checked 2.10.34 and 3.1.3). How do you check the result? It could be a problem with your PDF viewer?
So while it does work for me as you demonstrated when I export as a JPEG, or as a PDF with only one layer, when I try and make a PDF which makes a new page for each Layer of my GIMP image (all of which Layers have transparent areas in them) it will apply the Background Color to the transparent areas of the first page only, but the transparent areas of the rest of the pages will be filled with white.
I don't think there's a problem with my PDF viewer as I use Google Chrome for that.
(08-24-2025, 11:57 AM)rich2005 Wrote:
(08-24-2025, 09:59 AM)tomatoSauce23 Wrote: I'm using version 2.10.38 (revision 1)
...snip....
I have a visible layer in the layers-dialogue filled with black and labelled "Background", and placed at the bottom of the layers stack.
Yet still, any transparent areas in each layer will be filled with white. Deselecting Fill transparent areas with background color will still fill them with white also, as though it's disregarding that option altogether.
As Ofnuts points out the background color is not the same as the background layer. You can change the background color to black.
Also for Gimp 2.10.38 there is an old script which merges the background layer with all layers, originally meant for animations, looks like this: https://i.imgur.com/A39SdZZ.mp4
Attached, unzip and put in your scripts folder.
Thank you for that. That could be the solution to use. I'd just like to see if I can get the Background Color to apply to every Layer of the PDF first before I turn to a Script...
08-26-2025, 07:46 AM (This post was last modified: 08-26-2025, 07:47 AM by rich2005.)
Quote:.......I don't think there's a problem with my PDF viewer as I use Google Chrome for that.
A web browser will generally replace transparency with white.
Quote: I'd just like to see if I can get the Background Color to apply to every Layer of the PDF first before I turn to a Script...
That is the best way, when you eventually move to Gimp 3 then those old scripts/plugins do not work.
Prove the concept to yourself. Make an image with layers and "transparent" holes in the layers. then for any particular layer Layer -> Transparency -> Remove Alpha Channel Try using different background colours. That is what happens for the layers when you export your PDF.
Quote:.......I don't think there's a problem with my PDF viewer as I use Google Chrome for that.
A web browser will generally replace transparency with white.
Quote: I'd just like to see if I can get the Background Color to apply to every Layer of the PDF first before I turn to a Script...
That is the best way, when you eventually move to Gimp 3 then those old scripts/plugins do not work.
Prove the concept to yourself. Make an image with layers and "transparent" holes in the layers. then for any particular layer Layer -> Transparency -> Remove Alpha Channel Try using different background colours. That is what happens for the layers when you export your PDF.
Thanks for this. It is useful to know this, regarding Alpha Channels and the Background Colour. But the impetus for this post was when importing a bunch of JPEGs and then wanting to make a PDF containing each on its own layer with a particular colour (black) filling the transparency that surrounds any of those pictures that don't quite fit the set size of the pages of the PDF. Seems until the bug is fixed I'll be using the script that you(?) gave earlier in the replies.
(08-24-2025, 11:57 AM)rich2005 Wrote:
(08-24-2025, 09:59 AM)tomatoSauce23 Wrote: I'm using version 2.10.38 (revision 1)
...snip....
I have a visible layer in the layers-dialogue filled with black and labelled "Background", and placed at the bottom of the layers stack.
Yet still, any transparent areas in each layer will be filled with white. Deselecting Fill transparent areas with background color will still fill them with white also, as though it's disregarding that option altogether.
As Ofnuts points out the background color is not the same as the background layer. You can change the background color to black.
Also for Gimp 2.10.38 there is an old script which merges the background layer with all layers, originally meant for animations, looks like this: https://i.imgur.com/A39SdZZ.mp4
Attached, unzip and put in your scripts folder.
Thanks, that Script works very well.
For anyone who comes here in the future: it needs to go in your Scripts folder and not your Plug-Ins folder, just to be clear (for me this was
"C:\Users\[user]\AppData\Roaming\GIMP\2.10\scripts"
); it applies whatever is on the bottom-most layer as a "background" to all of the other layers, filling their transparent areas with it (it doesn't matter if the bottom-most layer is Visible when you apply it, by the way); access it through "Filters -> Animation -> Combine background".