The filter object enables your app to apply filters to the bitmaps contained in Image widgets. This section discusses the filter object for the following item:
A dictionary of attributes that contains the name of the filter and the filter's supporting data.
Example
//By using the below function, you can add a cartoon filter over your image.
createFilterForiOS:function(){var imgBright = kony.image.createImage(this.imageBytes);var filterobj = kony.filter.createFilter();var filterData ={"filterName": kony.filter.COMIC_EFFECT,"inputImage": imgBright,};
filterobj.applyFilter(filterData);var imageObj = filterobj.getOutputImage();this.view.imgBrite.rawBytes = imageObj.getImageAsRawBytes();this.view.forceLayout();}
Return Values
None
Remarks
For information about the available filters and their required supporting data, please see the constants in the kony.filter namespace.
The following filters change the dimensions of the Image object.