Just to clarify, "as they used to" refers just to the final visual result if the background is white, it doesn't mean using semi-transparency: just as currently we don't do "pure" inversion (especially when the background is near 50% grey), we can similarly tweak the function to give a given image as the background approaches white.
OK, now the function is (in helper/sodipodi-ctrl.cpp):
#define COMPOSE_X(b,f,a) ( ( ((guchar) b) * ((guchar) (0xff - a)) + ((guchar) ((b ^ ~f) + b/4 - (b>127? 63 : 0))) * ((guchar) a) ) / 0xff )
where b is background, f is foreground, a is alpha. Propose your own and we'll compare.
which the default style is decidedly bad. E.g. inversion is bad for very noisy background: inverting noise is still noise.
The goal of the handle is not to turn noise into non-noise. Its main goal is to be visible. With inversion, it fails to be visible only when it overlays an object which is a copy of the handle, i.e. has inverse color relative to the surroundings and has the same shape. The probability of this is close to zero. Any other noise is not an obstacle to it being visible with inversion.
_________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus&pgmarket=en-ca&RU=http%3a%2...
bulia byak wrote:
The goal of the handle is not to turn noise into non-noise. Its main goal is to be visible. With inversion, it fails to be visible only when it overlays an object which is a copy of the handle, i.e. has inverse color relative to the surroundings and has the same shape. The probability of this is close to zero. Any other noise is not an obstacle to it being visible with inversion.
Actually, it's more likely to be invisible than a single colour if there are a lot of higher frequencies in the image (something that will be rare until we have patterns). Clearly it would be hard to see on a background of black and white angular regions.
Not that I know a better solution, perhaps pick one of three colours that is maximally distant from the underlying colours.
njh
On Sat, 2004-02-28 at 01:05, Nathan Hurst wrote:
Actually, it's more likely to be invisible than a single colour if there are a lot of higher frequencies in the image (something that will be rare until we have patterns). Clearly it would be hard to see on a background of black and white angular regions.
Not that I know a better solution, perhaps pick one of three colours that is maximally distant from the underlying colours.
Well, I suppose we could apply a low-pass filter when selecting the inverse colors?
-mental
participants (3)
-
bulia byak
-
MenTaLguY
-
Nathan Hurst