PictureEffectsConsole Xojo Plugin

ColorFilterEffectConsole.Apply Method (console only)

Applies the effect on a given 32 bit source image with a given 32 bit mask and returns the result to a new image.

Apply(
   source as Picture,
   red as Integer,
   green as Integer,
   blue as Integer,
   mask as Picture) as Picture

Parameters

source
The source image.
red
This value specifies how much the red channel should be altered.
The value can be from -255 to 255. Values out of this range will make the function return nil and not modify the source picture. Value of 0 has the meaning of no change for this channel.
green
This value specifies how much the green channel should be altered.
The value can be from -255 to 255. Values out of this range will make the function return nil and not modify the source picture. Value of 0 has the meaning of no change for this channel.
blue
This value specifies how much the blue channel should be altered. The value can be from -255 to 255. Values out of this range will make the function return nil and not modify the source picture. Value of 0 has the meaning of no change for this channel.
mask
To limit the filtering to certain pixels then set a picture defining the mask to this parameter. Pass nil to this parameter if the filtering should not be limited to certain pixels.

The mask picture must be a 32 bit picture and must be same size as the src picture. If the mask picture is not 32 bits and same size as the src picture then the function will fail and leave the result picture unchanged.

Returns

Picture
The result image or nil if failure.

Remarks

See Also

ColorFilterEffectConsole Class