blur

iOS / GLES2: How to achieve Glow Effect

╄→гoц情女王★ 提交于 2019-12-02 06:58:22
I have a compass style needle, free to spin. I need it to glow when it approaches a certain orientation, say 55 degrees. I want to have NeedleView subclass UIView, so I can manipulate (NeedleView*)needleView as if it was a UIView, just have a couple of extra methods - (void) feedAngle: (float) theta; - (void) feedGlow: (float) glow_01; doing a bit of research, I have found that the common technique is to take a greyscale copy of the needle's image, blur it, save it as a GL texture, and then wrap it onto a quad that sits behind the actual needle's quad. then I am a bit woolly.... I guess I set

Optimized float Blur variations

吃可爱长大的小学妹 提交于 2019-12-02 06:14:20
I am looking for optimized functions in c++ for calculating areal averages of floats. the function is passed a source float array, a destination float array (same size as source array), array width and height, "blurring" area width and height. The function should "wrap-around" edges for the blurring/averages calculations. Here is example code that blur with a rectangular shape: /***************************************** * Find averages extended variations *****************************************/ void findaverages_ext(float *floatdata, float *dest_data, int fwidth, int fheight, int scale, int

Blur effect on bitmap using C

廉价感情. 提交于 2019-12-02 04:04:36
I'm writing program applying blur filter on mp4. I'm exctracting bmp files from mp4 with ffmpeg. But the blur result is wrong. Some parts of picture have been correctly blurred but other parts have wrong colors. original image http://i.imgur.com/XS4yqNd.jpg blurred image http://i.imgur.com/IbcxxA4.jpg This is the code for reading bmp, applying blur and writing to bmp file. int blur(char* input, char *output) { //variable dec: FILE *fp,*out; bitmap_header* hp; int n,x,xx,y,yy,ile, avgR,avgB,avgG,B,G,R; char *data; int blurSize = 5; //Open input file: fp = fopen(input, "r"); if(fp==NULL){ /

HTML5 Canvas Motion Blur effect?

孤街醉人 提交于 2019-12-01 18:26:37
I'm trying to use HTML5 canvas to make something like a motion blur effect and no success. Basically what I'm trying to do is to take a photo and make it look like "fast forwarded", like when you take a picture and the person moved. There are several libraries for canvas that have implemented various blurring algorithms. EaselJS has implemented x- and y-axis blurring independently, as you can see in this sample. All you might want is a x-axis blur from their libray. derekmc I got here with the opposite problem. I was trying to get rid of blur when scaling images. Fortunately, my problem leads

Animate the fractionComplete of UIViewPropertyAnimator for blurring the background

依然范特西╮ 提交于 2019-12-01 18:26:04
So I'm using the new UIViewPropertyAnimator and UIVisualEffectView to achieve the same thing as the Spotlight search when you scrolling down on the home screen and it blurs the background. I'm using the fractionComplete property to set the procent of how much to blur when panning a UIView. animator = UIViewPropertyAnimator(duration: 1, curve: .linear) { self.blurEffectView.effect = nil } And the amount of blurriness is changed with a value between 0.0 - 1.0. animator?.fractionComplete = blurValue But when I cancel the pan gesture I want the blur to animate back from where it is to no blur (e.g

Load BitmapImage into WriteableBitmap but no method existing

混江龙づ霸主 提交于 2019-12-01 13:42:55
The constructor of WriteableBitmap class with Windows 8 only takes two arguments: the height and the width of this object. Meanwhile with Silverlight it accepts a BitmapImage object as argument. (Verified on MSDN : WriteableBitmap.WriteableBitmap constructor ) I would like to load this BitmapImage because I'm trying to blur an image which already exists on my Assets folder. Thanks for your help, I succeed to blur my image. Here is the sample in order to link the BitmapImage into the WriteableBitmap object : BitmapImage bi = new BitmapImage(new Uri(filename, UriKind.RelativeOrAbsolute));

How to apply blur effect on an image in C#? [closed]

别说谁变了你拦得住时间么 提交于 2019-12-01 11:09:55
How can I apply blur effect on an image in C# without using a library? Updated code (now much faster, requires use of UNSAFE keyword) static void Main(string[] args) { Bitmap bitmap = new Bitmap("C:\\Users\\erik\\test.png"); bitmap = Blur(bitmap, 10); bitmap.Save("C:\\Users\\erik\\test2.png"); } private static Bitmap Blur(Bitmap image, Int32 blurSize) { return Blur(image, new Rectangle(0, 0, image.Width, image.Height), blurSize); } private unsafe static Bitmap Blur(Bitmap image, Rectangle rectangle, Int32 blurSize) { Bitmap blurred = new Bitmap(image.Width, image.Height); // make an exact copy

Chrome is now blurring text when using transform translateY with percent

吃可爱长大的小学妹 提交于 2019-12-01 07:36:37
问题 Since a few days, I'm experimenting a pretty big issue when using the very cool technique for vertically centering a div with css3 transform (transform: translateY(-50%); ) described here: https://davidwalsh.name/css-vertical-center Indeed, the elements (text or images) included in this div get blurry. I tried a lot of techniques (transform: translateZ(0); backface-visibility; scale(1); translateX( calc( -50% + 0.5px ) ); filter: blur(0); and so on). But nothing actually works. The only one

How to blur a view or layout in android?

强颜欢笑 提交于 2019-12-01 05:43:18
I'm trying to blur a view or layout like the example i have below. So far I have only seen examples of bluring images and im confused on how to implement a blur on a layout. I hope you guys can help! Cheers! Try this Library its nice and simple to use. Setup Dependencies dependencies { compile 'jp.wasabeef:blurry:2.0.3' } Functions Overlay Parent must be ViewGroup Blurry.with(context).radius(25).sampling(2).onto((ViewGroup) rootView); Into Blurry.with(context).capture(view).into(imageView); Blur Options Radius Down Sampling Color Filter Asynchronous Support Animation (Overlay Only) Blurry.with

How to blur a view or layout in android?

三世轮回 提交于 2019-12-01 04:03:51
问题 I'm trying to blur a view or layout like the example i have below. So far I have only seen examples of bluring images and im confused on how to implement a blur on a layout. I hope you guys can help! Cheers! 回答1: Try this Library its nice and simple to use. Setup Dependencies dependencies { compile 'jp.wasabeef:blurry:2.0.3' } Functions Overlay Parent must be ViewGroup Blurry.with(context).radius(25).sampling(2).onto((ViewGroup) rootView); Into Blurry.with(context).capture(view).into