gareth wrote:Good idea but odd effects ? Doesnt seem to weight correctly on 2 channels?
Tried on gravestone with trees in background ( approximately white and green image)
-300/0/0 mostly black image
-300/-10/0 image comes back - white grave
-300/10/0 image 'solarised' with white for green area and very dark for white area.
I wondered how long it would take for someone to discover this ... not long! This is a feature not a bug. As I said on my web page,
(But note: if you set each of the R,G,B sliders to -100 then the image will go black, as you've set each of the channels to zero. Any other combination of the sliders is ok, but some extreme negative settings can produce odd effects.)
I regard your examples as extreme. I'll explain the maths below. The easy way to prevent this kind of thing is to limit the sliders to the (-100, 100) range, but I chose not to do that so as not to limit the usefulness of the plugin. If you find values that produce strange effects ... then don't use them.
Let's set a = 1 + (red slider /100) and the same for b and c. Then the formula being used by this plugin is rather simple, it's
B&W = (a*R + b*G + c*B) / (a + b + c)
Now the question is what happens when a+b+c = 0? The plugin tests for this and in this case divides by 1 rather than by zero and crashing the program. So if all sliders are -100, then a=b=c=0 and the formula is (0+0+0)/1 = 0 and you get all black in this special case. Your first case is equivalent (G + B - 2*R ) which will be dark rather than black. Your second case would be ( 1.1*G + B - 2*R) * 10. Such large changes will probably clip a lot of pixels. The third case is left as an exercise for the reader. If you want some really wild examples, try (-300,-1,0) and (300,1,0), which may have been what you really meant. The (-300,-1,0) case is (2*R - 0.99*G - B ) * 100 and you see that you get some very large changes when (a+b+c) is close to zero, which would no doubt lead to a lot of clipping.
I'm open to other ideas on how to handle the maths of extreme values, but I left the possibility of them open so that you could use more useful settings, like (200, 0, -200) for psuedo-IR.