benbahrenburg / Ti.BlurView

A Blur View implementation for Titanium
161 stars 46 forks source link

How to get background blurred on opening? #11

Closed caspahouzer closed 10 years ago

caspahouzer commented 10 years ago

I'm using your example overlay_bg_demo.

My problem: I'm opening the window and after 0.5 - 1 second, the screen get blurred. How to get the screen blurred without seeing the unblurred background?

benbahrenburg commented 10 years ago

You will want to use the GPUBlurImageView for that as it is faster. Unfortunately this means you need to do your own image cropping, but overall I think you will find that faster.

caspahouzer commented 10 years ago

Do you have an example for me?

benbahrenburg commented 10 years ago

GPU Blur Examples https://github.com/benbahrenburg/Ti.BlurView/blob/master/iOS/example/GPU_Box_Blur.js https://github.com/benbahrenburg/Ti.BlurView/blob/master/iOS/example/GPU_Gaussian_Blur.js https://github.com/benbahrenburg/Ti.BlurView/blob/master/iOS/example/GPU_IOS_Blur.js

With Cropped example https://github.com/benbahrenburg/Ti.BlurView/blob/master/iOS/example/blur_on_scroll.js

benbahrenburg commented 10 years ago

Docs are also available here https://github.com/benbahrenburg/Ti.BlurView/blob/master/iOS/documentation/GPUBlurImageView.md

caspahouzer commented 10 years ago

Many thanks!

Is this iOS only?

benbahrenburg commented 10 years ago

The full feature GPUBlurImageView is only available on iOS as it depends on GPUImage. If you are just looking for a Box Blur you can use BasicBlurView https://github.com/benbahrenburg/Ti.BlurView#basicblurview

On iOS this will use the GPUBlurImageView and on Android it uses a blur in Java. You might need to add a conditional for blurRadius as that tends to vary per platform.

caspahouzer commented 10 years ago

Thanks!