Hi Chris, Here's a trick I used a while back: make a snapshot of the card, then scale the image down, then scale it up again.
Simple recipe to try it out: - create a new stack and drag random controls onto it - drag on a button and set its script to ## constant kBlurFactor = 2 on mouseUp local tBlurredImage put the long id of image "BlurredImage" into tBlurredImage set the lockLocation of tBlurredImage to false export snapshot from this card to image "BlurredImage" as PNG set the lockLocation of tBlurredImage to true set the height of tBlurredImage to the height of tBlurredImage div kBlurFactor set the width of tBlurredImage to the width of tBlurredImage div kBlurFactor export snapshot from image "BlurredImage" to image "BlurredImage" as PNG set the rect of tBlurredImage to (0,0,the width of this card,the height of this card) show tBlurredImage end mouseUp ## - drag on an image; set its name to "BlurredImage", set its resizeQuality to Best and set its script to ## on mouseUp hide me end mouseUp ## -> maybe also turn on its colorOverlay and tweak the settings It's not a gaussian blur, but it's good enough and quicker to execute than a scipt that fiddles with imageData. HTH, Jan Schenkel. ===== Quartam Reports & PDF Library for LiveCode www.quartam.com ===== "As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld) >________________________________ > From: Chris Sheffield <[email protected]> >To: How to use LiveCode <[email protected]> >Sent: Thursday, August 29, 2013 6:45 PM >Subject: blur a background > > >Is there any way in LC to set a graphic effect such that everything behind is >blurred, much like we see in mobile apps? I need to do something like this and >am not sure how. If it's not possible, can something be done to an image to >create this effect, and then have that image imported into an LC stack? > >Thanks, >Chris > > >-- >Chris Sheffield >Read Naturally, Inc. >www.readnaturally.com > > >_______________________________________________ >use-livecode mailing list >[email protected] >Please visit this url to subscribe, unsubscribe and manage your subscription >preferences: >http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
