Hi, is it possible to work with a color range using Surface Object or any other extenion?
I would like to "crop out" chroma key, as an example.
Thanks a lot in advance.
Hi, is it possible to work with a color range using Surface Object or any other extenion?
I would like to "crop out" chroma key, as an example.
Thanks a lot in advance.
The surface object has functions that let you iterate through each pixel in your image and change it, using the action "callback: loop though area" or "loop through image" to initiate a loop, then the condition "on callback" and action "return color" (or return alpha) to set that pixel. If you simply wanted to set a color or range of colors to be transparent, you can do something like;
+always
=loop through image with callback {name} flags set to 3 (get color + set color)
+on callback {name}
+compare two general values getGreen(CallbackSrcCol("surface")) >= 240
=return color TranspColor("surface")
that would change every pixel in the image with a Green component of 240+ into a transparent pixel.