blur

C# dialog form with blur background

元气小坏坏 提交于 2019-12-03 07:31:38
Good afternoon, Just a simple question. Is it possible to make a parent form blurry while you show a new dialog form in winforms? if it's not possible by default, are there any workarounds? here is just a sample picture of what I want to archive: user886079 I didn't think this was possible but I found a similar question here: Layer effects (blur, etc.) in WinForms The code is from an answer over there but I've changed it slightly... You'll need to compile with the unsafe on (see build tab of your project's properties (Allow unsafe code)). Basicly you put everything in your form in a panel

How to remove white border from blur background image

和自甴很熟 提交于 2019-12-03 07:15:02
问题 How to remove the white blur border from the background image. <div class="background-image"></div> CSS, i tried adding margin:-10px but it doesn't work .background-image { background: no-repeat center center fixed; background-image: url('http://www.hdpaperz.com/wallpaper/original/windows-8-wallpapers-2560x1600-2311_1.jpg') ; background-size: cover; display: block; height: 100%; left: -5px; top:-5px; bottom:-5px; position: fixed; right: -5px; z-index: 1; margin:0px auto; -webkit-filter: blur

How to blur everything except 2 nodes. Spritekit (Swift)

杀马特。学长 韩版系。学妹 提交于 2019-12-03 06:19:01
I'd like to blur the background of my game when self.view?.scene?.paused = true But the the button and the paused label (both SKSpriteNode's) should not be blur. they all have different Z-index values. The scene is paused when the button node is pressed and resumed when the button is pressed again. I cant find a way to achieve this in Swift. i found some suggestions that use SKEffectNode? The basic steps... Create an SKEffectsNode Create a CIGaussianBlur CIFilter Assign the filter to the effects node Add nodes to the effects node (child nodes will be blurred) and example code in Swift... //

Cross-browser: detect blur event on window

萝らか妹 提交于 2019-12-03 05:47:12
I just read, I think all the thread that deals with this subject, and I can't find a real solution to my problem. I need to detect when the browser window loses its focus, i.e. a blur event. I've tried all the scripts on stackoverflow, but there doesn't seem to be a proper cross-browser approach. Firefox is the problematic browser here. A common approach using jQuery is: window.onblur = function() { console.log('blur'); } //Or the jQuery equivalent: jQuery(window).blur(function(){ console.log('blur'); }); This works in Chrome, IE and Opera, but Firefox doesn't detect the event. Is there a

Image blur with CSS/Javascript: is it possible?

大憨熊 提交于 2019-12-03 05:46:21
问题 Is it possible to add a blur effect to an image using CSS and Javascript? 回答1: Yep, this works a treat: Pixastic is an experimental library which allows you to perform a variety of operations on images using just a bit of JavaScript. The effects supported out of the box include desaturation/greyscale, invert, flipping, brightness/contrast adjustment, hue/saturation, emboss, blur, and many more... Pixastic works by utilizing the HTML5 Canvas element which provides access to raw pixel data,

jQuery $(window).blur vs native window.onblur

霸气de小男生 提交于 2019-12-03 05:16:26
What are the advantages of using jQuery's $(window).blur(function() { ... }) to attach an event handler versus setting it directly with window.onblur = function() { ... } It seems that the latter is less robust because it only supports one blur handler, and when used with other packages, other code might override the window.blur value with another function. However, couldn't this also happen with the jQuery implementation too, which presumably uses window.blur as its underlying implementation? EDIT: Several people have also mentioned the window.addEventListener alternative, which can be used

Smoothing Edges of a Binary Image

孤街醉人 提交于 2019-12-03 05:11:31
问题 How to smooth the edges of this binary image of blood vessels obtained after thresholding. I tried a method somewhat similar to this method but did not quite get the result I expected. Here's the code: import cv2 import numpy as np INPUT = cv2.imread('so-br-in.png',0) MASK = np.array(INPUT/255.0, dtype='float32') MASK = cv2.GaussianBlur(MASK, (5,5), 11) BG = np.ones([INPUT.shape[0], INPUT.shape[1], 1], dtype='uint8')*255 OUT_F = np.ones([INPUT.shape[0], INPUT.shape[1], 1],dtype='uint8') for r

jQuery blur and the enter key

自作多情 提交于 2019-12-03 04:48:13
I am trying to update a div dynmically with a googlemap based on a zip code being entered. Its working fine if the user tabs away from the input box (id ZipCode) but if they press enter it doesn't blur the field. I have got a variation on this working with onkeyup, but one event calls the other and its a mess. Is it possible to kick the function off if either event occurs. $(document).ready(function() { $("#ZipCode").blur(function() { $("#dynamic").load('googlemap.php', {zipcode: $('#ZipCode').val(), maxdistance: $("input[name='MaxDistance']:checked").val() }, function() { }); }); }) ; Thanks

Blur an input field on keypress enter on Angular

非 Y 不嫁゛ 提交于 2019-12-03 04:33:48
I found this question very useful for submitting a form when someone presses the "enter" key: Javascript : angular.module('yourModuleName').directive('ngEnter', function() { return function(scope, element, attrs) { element.bind("keydown keypress", function(event) { if(event.which === 13) { scope.$apply(function(){ scope.$eval(attrs.ngEnter, {'event': event}); }); event.preventDefault(); } }); }; }); HTML: <div ng-app="" ng-controller="MainCtrl"> <input type="text" ng-enter="doSomething()"> </div> What I would like to do know, is to set the field to blur when the "enter" key is pressed. What

How to add a blur mask with a custom shape above a dynamic camera view in Swift?

烈酒焚心 提交于 2019-12-03 03:38:42
I am using Swift to develop an iOS application with a camera feature, and it requires a blur layer above the camera view with a hole in the middle like the image shown below. I have tried several methods, but none of them added the blur effect without covering the hole. I didn't find working solutions after spending time on Google as well. Can anyone provide some hints on how can I only blur the non-transperant part of a png image that is attached to a image view? Methods that I have tried: Use the built-in iOS 8 blur effect let blurEffect = UIBlurEffect(style: UIBlurEffectStyle.Dark) let