Skip to content

voltmx.filter Namespace

The voltmx.filter namespace provides your apps with the ability to create and manage filters for use with the Image widget. Information about the voltmx.filter namespace is presented in the following topics:

Functions

The voltmx.filter namespace provides the following function:

voltmx.filter.createFilter Function


Creates a new filter object for use with the Image widget.

Syntax


voltmx.filter.createFilter()

Example


var filterObj = voltmx.filter.createFilter();

Input Parameters

None.

Return Values

A new filter object.

Platform Availability

Available on iOS and Android.

Constants

The voltmx.filter namespace contains the following constants:

Android Filters


The following filters are available on Android devices.

Filter NameFilter TypeDescription
AdditionCompositingvoltmx.filter.ADDITION_COMPOSITINGThis filter is available from Android 3.0 and above.
BoxBlurvoltmx.filter.BOX_BLURIncrease or decreases the blurriness of image.
Brightnessvoltmx.filter.BRIGHTNESSIncreases or decreases the brightness of an image.
ClearCompositingvoltmx.filter.CLEAR_COMPOSITINGThis filter is available from Android 3.0 and above.
ColorClampvoltmx.filter.COLOR_CLAMPThis filter clamps the colors of input image within the given range.
ColorInversionvoltmx.filter.COLOR_INVERSIONInverts the colors of given image. When this filter is applied, for each pixel having [R,G,B] components in given image, this filter inverts the color components of those pixels to [255-R, 255-G, 255-B]. Transparency or Alpha component is untouched
ColorMatrixvoltmx.filter.COLOR_MATRIXThis filter transforms the colors of given image as per the input parameters
DarkenCompositingvoltmx.filter.DARKEN_COMPOSITINGThis filter is available from Android 3.0 and above.
EdgeDetectionvoltmx.filter.EDGE_DETECTIONDetects or Highlight the edges of given image.
Embossvoltmx.filter.EMBOSSApplies an embossing effect for a given image.
GaussianBlurvoltmx.filter.GAUSSIAN_BLURSpreads source pixels by an amount specified by a Gaussian distribution to increase the blurriness. Blurriness of this filter is smooth compared to BoxBlur.
Greyscalevoltmx.filter.GREYSCALEConverts given image to black & white or monochrome image.
MultiplyCompositingvoltmx.filter.MULTIPLY_COMPOSITINGThis filter is available from Android 3.0 and above.
LightenCompositingvoltmx.filter.LIGHTEN_COMPOSITINGThis filter is available from Android 3.0 and above.
OverlayCompositingvoltmx.filter.OVERLAY_COMPOSITINGThis filter is available from Android 3.0 and above.
SourceAtopCompositingvoltmx.filter.SOURCE_ATOP_COMPOSITINGThis filter is available from Android 3.0 and above.
ScreenCompositingvoltmx.filter.SCREEN_COMPOSITINGThis filter is available from Android 3.0 and above.
Sharpenvoltmx.filter.SHARPENIncreases the sharpness of image.
SourceInCompositingvoltmx.filter.SOURCE_IN_COMPOSITINGThis filter is available from Android 3.0 and above.
SourceOutCompositingvoltmx.filter.SOURCE_OUT_COMPOSITINGThis filter is available from Android 3.0 and above.
SourceOverCompositingvoltmx.filter.SOURCE_OVER_COMPOSITINGThis filter is available from Android 3.0 and above.
XorCompositingvoltmx.filter.XOR_COMPOSITINGThis filter is available from Android 3.0 and above.

Filter Input Parameters


The filter object uses the following input parameters.

ParameterDescription
inputImageImage object
inputRadiusFloating point number
inputMaskMasking image
inputAngleFloating point number
inputNoiseLevelFloating point number
inputCenterArray of two values defining the (x,y) location of the center
inputScaleFloating point number
inputAmountFloating point number
inputSharpnessFloating point number
inputMinComponentsArray of four floating values
inputMaxComponentsArray of four floating values
inputSaturationFloating point number
inputBrightnessFloating point number
inputIntensityFloating point number
inputContrastFloating point number
inputRVectorArray of four floats
inputGVectorArray of four floats
inputBVectorArray of four floats
inputAVectorArray of four floats
inputBiasVectorArray of four floats
inputRedCoefficientsArray of four floats
inputGreenCoefficientsArray of four floats
inputBlueCoefficientsArray of four floats
inputAlphaCoefficientsArray of four floats
inputEVFloating point number
inputPowerFloating point number
inputNeutralArray of two floating point numbers
inputTargetNeutralArray of two floating point numbers
inputPoint0Array of two floating point numbers
inputPoint1Array of two floating point numbers
inputPoint2Array of two floating point numbers
inputPoint3Array of two floating point numbers
inputPoint4Array of two floating point numbers
inputColorArray of four numbers representing the color
inputRedCoefficientsArray of ten floating point numbers
inputGreenCoefficientsArray of ten floating point numbers
inputBlueCoefficientsArray of ten floating point numbers
inputGradientImageGradient Image
inputBackgroundImageBackground Image
inputLevelsFloating point number
inputColor0Array of four hex numbers representing the color
inputColor1Array of four hex numbers representing the color
inputInsetPoint0Array of two floating point numbers
inputInsetPoint1Array of two floating point numbers
inputStrandsFloating point number
inputPeriodicityFloating point number
inputRotationFloating point number
inputZoomFloating point number
inputDisplacementImageImage object
inputTextureImage object
inputRefractionFloating point number
inputCropAmountFloating point number
inputCenterStretchAmountFloating point number
inputWidthFloating point number
inputTransformArray of nine floats representing the transform
inputRectangleArray of four floating point numbers
inputAspectRatioFloating point number
inputTopLeftArray of two floating point numbers
inputTopRightArray of two floating point numbers
inputBottomRightArray of two floating point numbers
inputBottomLeftArray of two floating point numbers
inputExtentArray of four floating point numbers
inputRadius0Floating point number
inputRadius1Floating point number
inputGCRFloating point number
inputUCRFloating point number
inputCountInteger
inputHeightFloating point number
inputHighLimitFloating point number
inputLowLimitFloating point number
inputMaskImageMasking image
inputWeightsArray of floating point numbers
inputBiasFloating point number
inputUnsharpMaskRadiusFloating point number
inputUnsharpMaskIntensityFloating point number
inputHighlightAmountFloating point number
inputShadowAmount