What is the "Remove" blend calculation?

Here everybody can post his problems with PhotoLine
Benutzeravatar
Loadus
Mitglied
Beiträge: 47
Registriert: Do 27 Sep 2007 07:15

What is the "Remove" blend calculation?

Beitrag von Loadus »

I'm trying to cook up an edge detection algorithm, and the "Remove" blend mode in Photoline works best with the gaussian map. But what is the actual calculation behind "Remove"?
Benutzeravatar
Hoogo
Beta Tester
Beiträge: 4169
Registriert: So 03 Jul 2005 13:35
Wohnort: Deutschland

Re: What is the "Remove" blend calculation?

Beitrag von Hoogo »

It is an inversion of "normal".
Imagine a background.
Imagine another layer with an object with half-transparency above it, mode "normal".
Imagine this layer duplicated, the upper layer set to "remove". That will result in the original background.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
bkh
Beta Tester
Beiträge: 3687
Registriert: Do 26 Nov 2009 22:59

Re: What is the "Remove" blend calculation?

Beitrag von bkh »

Hoogo hat geschrieben:It is an inversion of "normal".
Imagine a background.
Imagine another layer with an object with half-transparency above it, mode "normal".
Imagine this layer duplicated, the upper layer set to "remove". That will result in the original background.
Probably, that doesn't help in Loadus' case when the foreground layer is fully opaque. Then, there is no inverse of "normal" since the original is totally covered.

However, it's easy to figure out what PL does when both layers are fully opaque: Firstly, it works on each colour channel separately. Basically, when the remove layer value is equal to the background value, the result is the same as the background value, if it's darker, the result is lighter and viceversa. The transition is quite steep, a difference of 8 (out of 255) turns a white pixel black. The formula must be something like r = b + 31·(b-f), where b, f, and r are the background, foreground (remove) and resulting channel values, all ranging from 0..255 (r is clipped if necessary).

Cheers

Burkhard.