IDilateErode

Function
The IDilateErode function isolates each channel and cuts or adds pixels to the edge of that channel. For example, to chew into your mask, set your channels to “a,” and then set the xPixels and yPixels values to -1. By default, you work on whole pixels. To switch to subpixel chewing, enable “soften.” Note that the soften parameter really slows the function. If you use the soften feature, use low values for xPixels and yPixels.

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...