It is currently Fri Jul 31, 2026 5:14 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Shadows On Transparent Background Darker Than It Should Be
PostPosted: Thu Aug 01, 2024 10:21 pm  (#1) 
Offline
GimpChat Member

Joined: Jun 06, 2018
Posts: 11
GIMP Version: 2.10.38
Operating System: Windows
OS Version: Windows 10
GIMP Experience: Experienced User



So I was removing a background on an image and had to recreate the drop-shadow layer afterwards.
I'm happy with it, but when I export the file, the drop-shadow is noticeably darker than it should be.

I've been messing with all kinds of image and export settings and I can't get it to export properly! If I add back a white background the shadow displays right, it's only with a transparent background that the shadow is noticeably stronger than it should be. Help?

To give an idea of what I'm talking about (using a piece of my own art) here's what it looks like with a white background (the strength it should be):
Image

And here's the result if I have a transparent background:
Image

Notice how the shadow is significantly stronger than it should be.
Is this a bug?


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Shadows On Transparent Background Darker Than It Should Be
PostPosted: Thu Aug 01, 2024 11:17 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 859
Location: SEA - South East Asia
It's an optical illusion depending the background the image is on, or/and an interpretation of your viewer/browser as well as the zoom in/out
BTW, Ofnuts wrote a nice article about zoom-/+ in a browser, gamma, color...
There you go >> https://www.gimp-forum.net/Thread-What- ... ions-wrong (Ph.D. needed, I mean there's a lot of math, spreadsheet, etc..., even some python)

Anyway, you can clearly see a difference between two viewers (XnView and Eye of MATE) for the very same image with transparency
Attachment:
screenshot_20240802-123045.jpg
screenshot_20240802-123045.jpg [ 333.06 KiB | Viewed 1740 times ]


I downloaded the one without BG, and put a white BG, immediately it did look the same as the one with the white BG (your first image)
Attachment:
screenshot_20240802-121302.jpg
screenshot_20240802-121302.jpg [ 90.64 KiB | Viewed 1740 times ]


As well as exported
Attachment:
screenshot_20240802-122131.jpg
screenshot_20240802-122131.jpg [ 97.55 KiB | Viewed 1740 times ]

_________________
Patrice


Top
 Post subject: Re: Shadows On Transparent Background Darker Than It Should Be
PostPosted: Fri Aug 02, 2024 1:13 am  (#3) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16139
Have you tried setting the opacity to the shadow layer a bit lower.

_________________
Image


Top
 Post subject: Re: Shadows On Transparent Background Darker Than It Should Be
PostPosted: Fri Aug 02, 2024 2:18 am  (#4) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14142
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
You could also adjust the intensity of the shadow with more control.
By using Color Curves set to Alpha.
This should immediately have a direct effect on the alpha channel of
the shadow layer and it's overall intensity and size.

Play with color curves by setting the channel value to alpha to try this out.

Attachment:
Screenshot (1987).png
Screenshot (1987).png [ 507.03 KiB | Viewed 1723 times ]


Attachment:
dhw2xlk-b8f54163-8c40-49da-b61d-bf7fc4fd1514_wallace.png
dhw2xlk-b8f54163-8c40-49da-b61d-bf7fc4fd1514_wallace.png [ 2.41 MiB | Viewed 1723 times ]

I applied the same setting to this image as seen in the curves dialog above.
This is simply one method I use to help control shadows.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Shadows On Transparent Background Darker Than It Should Be
PostPosted: Fri Aug 02, 2024 2:13 pm  (#5) 
Offline
GimpChat Member

Joined: Jun 06, 2018
Posts: 11
Oh wow, there's a lot to reply to! First of all, thank you everyone!

@PixLab
That makes no sense. I tried what you did and imported the transparent version into Gimp and it was the correct opacity, however that doesn't explain why the shadow is always noticeably darker outside of Gimp. My photo viewer is set to light mode, so white background. I imported the same image into Paint Tool SAI, which has a white background, the image in my browser when in light mode, with a white background, all of them display the strong shadow. Heck, even on here you can clearly see the stronger shadow on a white background.
I want the image to be transparent and the shadow to remain at its expected strength when viewed in a viewer with a white background.

All it looks like to me is that it's an issue with Gimp 2.10 which is not good for giving drop shadows with specific opacities to images. I don't remember having this issue in Gimp 2.8 or even 2.6

@Rod
I tried that just now, it does work but it's needlessly fiddly if I'm going for precision (my project is to remove a background from an image, but I needed to reconstruct the drop-shadow afterwards and where I have it right now is perfect if I preview it with a white background in Gimp.)

@Wallace
I would have never thought about using the Curves tool for this! I'll give it a try to see if I can achieve the results I'm looking for.

Edit:
I wound up exporting the image and the shadow layer (on full opacity) and recreated the shadow's opacity how I wanted it in Paint Tool SAI with no issue.
I have since opened a bug report on GNOME since this seems to be an issue with Gimp itself.


Top
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group