while i know that here are already other people have photoshop style copymodes for rgb picture/video channels available, i´d like to extend my own and write things from scratch.
i could not find any useful sources on the net from where i could start implemting math operations for RGB numbers/lists. though many of the copymodes are pretty easy and i could just find them by trial and error, i would (this time) prefer to do thing "right", reproducing the right effect for the right terminology.
the adobe and quicktime development docs are also everything else but useful. does anyone know where to find such descriptions for calculating RGB stuff?
ok, that might need an example.
an "addition" blend mode could be done by [expr min(255\,($i1+$i2))] for one channel of 8-bit color, or by [vexpr min(1.\,($f1+$f2))] for 3 or more channels in floating point.
the "dissolve" mode can be realized with a pretty [vexpr ($f3==1)*$f1 + ($f3!=1)*$f2] controlled by [expr (random(0\,1)].
pretty easy, huh? as you can see i can do that by heart. ;)
one of my main problems is actually the RGB to HCL conversion which is required for the hue and chroma blend modes. as i am not a mathematican i am not able to make up a max patch from some formulas found on the net, they are too hard to read for me.
just found something: http://www.simplefilter.de/en/basics/mixmods.html
it proves all of my old abstractions right (including my formulas for "overlay" and the other 3 blend modes which use split´ formulas for the lighter and darker halves of the channels values. these modes also were a matter of uncertainty until now.)
still would be happy for a HCL conversion formula. because i really dont want to use shitty HSB to change the luminance of a nature video, if you know what i mean. ;)
hehe, now i have two more than before, pin light and vivid light. ^^
but i guess it was a dumb idea to post a color question in the msp forum, mb i should move it to jitter tomorrow.
conversion or rgb to hue/chroma/luma solved.
but it seems to be overkill for my application in question.