Making White whiter in grayscale

Frans-Jan Wind's icon

Hi list,

I have a grayscale 1 plane char stream. I'd like to (probably) multiply this stream with an object which will make the white whiter but will keep the black. I'd try the [jit.op @op + @val 1.] but this will also whiten the black parts. If someone can give me a direction to look I'd be thankful!

Best, Frans-Jan

Rob Ramirez's icon

you want something like photoshop levels. the simple answer is to use the vizzie module MAPPR:

Max Patch
Copy patch and select New From Clipboard in Max.

the more complicated answer: for matrix input use jit.charmap, for texture input use jit.gl.slab @file cc.colormap.jxs. You can patch together something to use as curve editor using the function object, and the bspline object from the Jasch objects package (installable via the Package Manager).

Max Patch
Copy patch and select New From Clipboard in Max.

Frans-Jan Wind's icon

Just wow. It took me a while to understand the complicated answer, which is no understatement. But this solution is beautiful! Thank you.