The idea of removing the linear gradient background is to use color overlay .
We know that the color in the computer is represented by RGB, if the RGB color of a pigment is (A1,A2,A3), then the pixel is mixed with a (255-A1,255-A2,255-A3) color, the result is white on the pixel point. Introduction of the principle is complete.
This method has a very practical application.
There is an image with a linear gradient background, we want to insert this image into a white background ppt, need to remove its gradient background
First pick the background color at both ends of the gradient, the top is (221,242,242), the bottom is (83,207,207)
Then create a new layer to set the blending mode of the layer to linear dodge (color Dodge is also possible). Because the linear Dodge algorithm is:
Result color = primary color + blend color
The algorithm for color dodge is
Result color = Base color + (base color * mixed color)/(255-blend color)
Then a linear gradient on the layer, the color of the gradient is just the inverse of the original color, that is (34,13,13) above, the bottom is (172,48,48), the picture after the operation is as follows
Use Phtoshop to remove the linear gradient background from the picture