BlurImage
BlurImage ImageIndex, BlurAverage#
 
Parameters:

    ImageIndex = The Index of image you wish to blur
    BlurAverage# = The divider used to average out the smudged pixels
Returns: NONE
 

     BlurImage takes an image and produces a smudged (out of focus) version of it. You can specify how badly the image is changed by the pixel averaging value.



FACTS:


     * BlurImage reads the 8 pixels around each pixel in the image and averages them out. The averaging is used to smooth out (filter) each pixel in the resulting image. For large images this is generally not fast enough for real time use !

     * Blur Average values should range between 1 and 255. Going outside of that range may give unexpected results.

     * BlurImage alters the pixels within the image and is therefore none reversible.





Mini Tutorial:


      Creating an image, display it, fade it by 50 percent and then display the final result

  
  
  
; Make an Image with some circles on it
  CreateImage 1,200,100
  RenderToImage 1
  For lp=1 To 20
     CircleC Rnd(200),Rnd(100),Rnd(10) ,Rnd(1),RndRGB()
  Next lp
  RenderToScreen
  
; Clear the Screen to a blue colour
  Cls RGB(0,0,255)
  
; Draw our previously created image to the screen
  DrawImage 1,300,100,0
  
; Blur the Image so it's 50 percent of it's original brightness
  BlurImage 1,7
  
; Render the newly Blurred image to the screen, bellow the original.
  DrawImage 1,300,300,0
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  


 
Related Info: DrawImage | FadeImage | LightImage | MirrorImage | RGBmaskImage :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com