Function
This function isolates each channel and will cut pixels away or add them to
the edge of that channel. For example, if you wanted to eat into your mask,
you would set your channels to "a", and then set x-
and yPixels values of -1. By default, you are working on whole pixels,
but you can switch to sub-pixel chewing by toggling on soften. Note that
the soften parameter *really* slows the function down. We recommend low
values for x- and yPixels if you are turning on the soften feature.
Parameters
|
Type
|
Defaults
|
Function
|
channels |
string
|
"rgba" | The effected channels. |
x/yPixels |
float
|
0, xPixels | The amount of pixels added or taken on an edge. Positive values add to the edge, negative values eat away at the edge. |
border |
int
|
0 |
This tells Shake to consider or ignore the border pixels. |
soften |
int
|
0 | This toggle turns on softening, or effecting the sub-pixel. If this is turned on, it will considerably slow down the software at high x/yPixel values. |
sharpness |
float
|
0 | The sharpness factor for the softening. A value of 0 gives a smooth gradation, whereas 2 will give you a sharp cutoff. |
steps |
int
|
5 | This is the amount of regions that the image is divided up into. The intensity of the control image is divided up X amount of zones, with X being equal to regions. |
stepBlend |
float
|
1 | This controls the blending between the amount of regions (see below). If you put this at 0, each step will have a constant dilate value. If this is 1, there is a continuous blend between the different regions. |
controlChannel |
string
|
"a" | The channel of the second image to use to control the amount of dilate. |
invert |
int
|
0 | Inverts the controlChannel. |
Synopsis
image IDilateErode(
image img, image controlImg const char * channels, float xPixels, float yPixels, int borders, int soften float sharpness float stepBlend, int steps, const char * controlChannel, const char * channels, int invert );
Script
image = IDilateErode( img, controlImg, "channels", xPixels, yPixels, borders, soften, sharpness, stepBlend, steps, "controlChannel", "channels", invert );
Command Line
shake -idilateerode controlImg channels xPixels yPixels etc...