PictureEffectsConsole Xojo Plugin

GrayscaleEffectConsole.ApplyInPlace Method (console only)

Applies the effect in place on a given 32 bit source image with a given 32 bit mask.

ApplyInPlace(
   source as Picture,
   grayscaleTypeValue as Integer,
   mask as Picture)

Parameters

source
The source image.
grayscaleTypeValue
Use this parameter to specify which GrayScale algorithm to use.

0 = NTSC/PAL
1 = ITU_R
2 = Average
3 = Weighted average

Normally you would just pass a constant here like: GrayScaleType.NTSC_PAL

See GrayScaleType constants for details.
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.

Remarks

Do not use this to attempt to modify constant images that should not be changed. Constant images are for example images embedded into the project.

See Also

GrayscaleEffectConsole Class