: Remove Background Keeping Shadow I have a shadow on a solid coloured background. I know that the colour of the shadow is black (#000000), and I know exactly what the background colour is. How
I have a shadow on a solid coloured background. I know that the colour of the shadow is black (#000000), and I know exactly what the background colour is. How can I remove the colored background and convert the shadow into a black image with alpha? Given that I know what the colour of the shadow is the problem should be exactly solvable for an alpha-shadow that gives me back the original image when I overlay it on the background colour.
Using paint.NET, or Gimp, or any other free software. I can find lots of approximate solutions, that "work" even when the colour of the shadow is not known (Leaving some of the background colour "lingering" in the result), but I don't want that. I want the exact solution when I do know the colour of the shadow and the background.
More posts by @Phylliss782
1 Comments
Sorted by latest first Latest Oldest Best
I don't know GIMP very well, but the method should be the same as in Photoshop. (All the screenshots are from Photoshop.)
You need to make use of the divide blend mode (which is apparently called layer mode in GIMP).
We start out with a grayscale image, to which I have multiplied a colored background.
Create a new layer on top of the image, filled with the image's background color.
Set the blend mode/layer mode of the color layer to divide.
This removes the color from the image and leaves it with a white background.
Flatten the image.
In Photoshop it seems to work perfectly, but in GIMP the lightest color becomes (254, 254, 254)! So if you are using GIMP you need to use something like Levels to lower the white point by 1.
Invert the image.
Use the inverted image as Layer Mask for a completely black layer.
Now, you have a black image with a transparent background.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.