Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Semi-transparent background with a gradient.
#1
Hi

I have a semi-transparent background with a black gradient circle in the middle. The circle is solid in the middle and gets more transparent as it goes towards the edges. How do I make the background totally transparent without loosing the gradient soft edges? Cutting around won't work. I tried the magic wander but it for some reason selects the whole image. Thanks
Reply
#2
(04-07-2021, 08:35 AM)Mixxer Wrote: Hi

I have a semi-transparent background with a black gradient circle in the middle. The circle is solid in the middle and gets more transparent as it goes towards the edges. How do I make the background totally transparent without loosing the gradient soft edges? Cutting around won't work. I tried the magic wander but it for some reason selects the whole image. Thanks

You have to edit the alpha channel, which is done by editing the mask:
  • Layer ➤ Mask ➤ Add layer mask and initialize to "Transfer layer's alpha channel"
  • Start the Levels tool (which will apply to the mask)
  • The histogram is likely not reaching the left edge, so just drag the black-point handle to the beginning of the histogram curve to make the least opaque bit fully transparent.
  • You can also play wit the middle handle to adjust how the opacity is reduced.
   

  • Once happy with the result you an apply the mask Layer ➤ Mask ➤ Apply layer mask, but you can also keep the mask around.

You can have even more control with the Curves tools (where you can completely "shape" the opacity change...)
Reply
#3
Thanks for the reply.

Unfortunately I couldn't get it to work. For starters, my levels panel looks different. I see no histogram. I would post a screen capture but I can't find how.
Reply
#4
(04-07-2021, 10:18 AM)Mixxer Wrote: I would post a screen capture but I can't find how.

The "Attachments" link at the top right of this page tells you everything....
Reply
#5
Ok, thanks. Here is how I see my levels panel:

[Image: levels.jpg]
Reply
#6
OK Given the histogram there is tiny bit which is completely opaque (the small bar at X=255) while the rest of the layer is uniformly partially transparent (the tall bar around X=192). In the Layers preview the mask must mostly appear light gray with a small white area, and there is no opacity gradient in your image. So either your initial description isn't correct or you didn't create the layer mask properly.

Nevertheless if the layer is uniformly partially transparent you can create an opacity gradient by using the Blend tool (likely in Radial shape) to create a gradient from white (where things are fully opaque) to black (where things must be fully transparent).

Otherwise please attach a screenshot of your layers list.
Reply
#7
Indeed, in the Layers preview the mask appears light gray and the shadow in the middle is white.

There is indeed a gradient. You can actually see the edge of it on the Levels Panel screen capture top right. In that case it is not a circle.

I had some success with the Curves. But it is difficult to gauge when it is 100% transparent. And it also seems to eat into the soft edges. If I go far enough, I can actually make the edges smaller to the point where the soft edges are gone and the shadow becomes smaller, showing only the solid middle. The Levels would be easier as you can't drag it past 0, so I would know it is fully transparent, without overshooting.

By the way, how can you tell the semi transparent bar is at X=192? I don't see any numeric indication of that on that panel. Smile
Reply
#8
Quote:...I had some success with the Curves. But it is difficult to gauge when it is 100% transparent.

You can use sample points to show the colour values at specific points as you adjust the image. https://docs.gimp.org/2.10/en/gimp-sampl...ialog.html

Quote: ...it also seems to eat into the soft edges. If I go far enough, I can actually make the edges smaller to the point where the soft edges are gone..

Indeed a problem. It would have helped if you gave information about this semi-transparent BG. Plain colour or... what?
This using a 50% transparent background with a black circular gradient planted on top. Using Colour-to-Alpha for the adjustment with sample points.
3 minutes duration https://youtu.be/D3cyiKLq9oM
Reply
#9
(04-08-2021, 10:35 AM)rich2005 Wrote: You can use sample points to show the colour values at specific points as you adjust the image.  https://docs.gimp.org/2.10/en/gimp-sampl...ialog.html
And the very useful Pointer dialog...
Reply
#10
(04-08-2021, 07:01 AM)Mixxer Wrote: By the way, how can you tell the semi transparent bar is at  X=192? I don't see any numeric indication of that on that panel. Smile

I aligned my Levels dialog over your screenshot to get an estimate, then 192=128+64 so in hex it's xC0, in other words a round number Smile
Reply


Forum Jump: