Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (29 sloc) 1.04 KB

Image Blur - Android

How to use the Blur effects without using a view object.

Doing a blur without the view

If you need a greater level of control you can use the applyBlurTo method to perform the image operations yourself.

applyBlurTo

The applyBlurTo method takes a dictionary with the following fields.

Fields

blurRadius (optional): float

The blurRadius property sets how blurry the image is. By default this value is 8.

image : Url to image

The image parameter is the url to an image that will be used in the blur process. This URL must be local to your app, remote images are not supported

Example - Blurred Background


var mod = require('bencoding.blur');

var win = Ti.UI.createWindow({
	backgroundColor:'white', title:"Image Blur Demo"
});

var imgblurredImage = mod.applyBlurTo({
	image:'42553_m.jpg',
	blurRadius:10
});

var vwTest = Ti.UI.createImageView({
	width:Ti.UI.FILL, height:Ti.UI.FILL,
	image:imgblurredImage
});

win.add(vwTest);

win.open();