Forums > Jitter

White color to alpha

October 12, 2013 | 5:22 am

Hi every one,

I’m tring to achieve the following things :
- have an image in black&white, as you can see in enclosure.
- detect white color
- replace white by alpha channel (or other color) / and inverse : replace black by alpha channel
- send it by syphon with alpha channel

I’m trying to achieve this with slab and alphaglue, but it’s doesnt work as expected.

If i can do this in gl, it would be perfect!
Do you have any idea ?

Thanks!


October 12, 2013 | 5:26 am

Here is the patch

Attachments:
  1. gobotest.maxpat

October 12, 2013 | 12:13 pm

if you are on max6, you could use jit.gl.pix.

<code>

– Pasted Max Patch, click to expand. –

</code>


October 14, 2013 | 12:54 pm

I’m a Max 6 user,
And i’m very happy !

Thanks a lot!

To go further, do you (or other!) it is possible to replace white or black by a variable color ?
like [matrix 4 char 1 1] to go inside ?

Thanks again!


Viewing 4 posts - 1 through 4 (of 4 total)