Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Make URL Shortcut
SarSoft MediaPlayer - All in one video
Movable Hole with Mask Ink
Dave Client
markerXtra
Send OSA Script
Domicilia
Installer
Bevel Follow Mouse or Sprite-Alphamania
KeyPoll
MediaMacros Xtras Mall
 

 

 

Behavior Noise Algorithm 2

Added on 1/14/2006

 

Compatibilities:
behavior D8 D8_5 D9

This item has not yet been rated

Author: Chunick (website)

Adds random noise to an image. theImage - image object colorize - true or false. Either creates gray or colour noise theBlend - the level of blending to do. Value between 0-255 theInk - can apply an ink to the overlaying of the noise.

on Noise (theImage, colorize, theBlend, theInk)
  
  theWidth = theImage.width - 1
  theHeight = theImage.height - 1
  anImage = theImage.duplicate()
  if colorize then
    newImage = image(anImage.width, anImage.height, 8)
  else
    newImage = image(anImage.width, anImage.height, 8, #grayscale)
  end if
  
  repeat with y1 = 0 to theHeight  
    repeat with x1 = 0 to theWidth
      rnd = random(255)
      newImage.setPixel(point(x1,y1), color(rnd))
    end repeat
  end repeat
  
  anImage.copyPixels(newImage, anImage.rect, anImage.rect, [#ink: theInk, #blendLevel: theBlend])

  return anImage
  
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail