This example shows how to perform a simple Gaussian Blur effect on an image held in an ImageGlue Canvas. We'll limit the blur area to a rectangle inset 20 pixels from the edge of the image.

 

   
Create a Canvas
 
     
     

To start with you need an ImageGlue Canvas. We'll just create one and put a picture of a boat into it.

thePath = Server.MapPath("images/boat.jpg")
Set theCanv = Server.CreateObject("ImageGlue5.Canvas")
theCanv.DrawFile thePath, ""

   
Apply the Effect
 
     
     

Next we apply the blur to the image. Here we inset the area to be blurred by 20 pixels on each side. We are assuming that the image is at least 40 pixels wide.

Set theFX = Server.CreateObject("ImageEffects.FX")
Set theEffect = the
FX("Gaussian Blur")
theEffect.Top = 20
theEffect.Left = 20
theEffect.Width = theCanv.Width - 40
theEffect.Height = theCanv.Height - 40

theEffect.Image = theCanv.Image
theEffect.Apply

 

   
Save the Image
 
     
     

Finally we save the selectively blurred image.

thePath = Server.MapPath("images/blurboat.jpg")
theCanv.SaveAs thePath, ""