Layer Blending mode study (partial)

Source: Internet
Author: User

Change only Bright (lighten)

The formula is: Max (A, B)

It's just a big brightness, nothing to say.

Top floor

Underlying

After mixing

#50 50 50

#9f BE 1c

#9f be 50

From this example, it can be seen that the algorithm is a separate operation for each channel

Masking (color filter)

The formula is: 255-comp (a) *comp (b)/255

It is because the red part is always less than 1, so the minuend will be less than comp (b), so the Cmop (b*) is the equivalent of becoming smaller, thus b* become larger and brighter.

Top floor

Underlying

After mixing

80 80 80

154 185 24

186 207 96

255-175*101/255

Ans =

185.6863

255-175*70/255

Ans =

206.9608

x=0:255;

Y= (255-x). * (255-100)/255;

Plot (x, Y, ' R ')

On

Plot (x,255-y, ' B ')

Axis ([0 255 0 255])

Grid on

Look at the blue part, set the original for the bottom of 100, when top layer is 0 o'clock the top layer of the complement is 255, at this time B*=255-comp (b), the equivalent of no change, and when top layer is 255 when the top of the time-out 0, at this time b*=255 equivalent to achieve great.

Dodge (Color Dodge)

The formula is: A+a*b/comp (b)

The odd thing about this formula is that the coefficient of addend is a, and the reason for this is that the difference in brightness varies from one pixel to another, and the feeling is richer.

x=0:255;

Y=100+100*x./(255-x);

Plot (x, y)

Axis ([0 255 0 255])

Grid on

Add (Linear simple)

Formula: A+b

This is nothing to say, more simple than the filter, the same color as the Dodge can not be pulled out of the rhythm.

x=0:255;

Y=100+x;

Plot (x, y)

Axis ([0 255 0 255])

Grid on

formulas for various blending modes (collected from the network)

Layer Blending mode study (partial)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.