MDiv

Function
This function divides the color channels by the alpha channel.

When you color-correct a rendered (premultiplied) image, you should do a MDiv first to make it a non-premultiplied image, do the color-correction, then do a MMult to return the image to it's premultiplied state. For more information, see About Color.

Parameters
Type
Default
Function
ignoreZero
int
0

Tells Shake to ignore pixels with an alpha value of 0.

0 = Divide entire image.
1 = Ignore zero-value pixels.

Synopsis

image MDiv( image, int ignoreZero);

Script

image = MDiv( image, ignoreZero);

Command Line

shake -mdiv ignorezero

See Also
MMult, IDiv, IMult