05-30-2010, 01:38 AM
Update: New version out:
v0.85
Version v0.85
http://www.box.net/shared/9m54d8hkzu
http://www.box.net/shared/9m54d8hkzu
Code:
Â
#==============================================================================
# ** Additional Bitmap Methods
#------------------------------------------------------------------------------
# Â By Untra and Glitchfinder
# Â 5/29/10
# Â v0.85
#==============================================================================
class Bitmap
#------------------------------------------------------------------------------
#Make sure you have uabm.dll in your project folder.
#You can get it from (assuming link is not dead):
#http://www.box.net/shared/9m54d8hkzu
#------------------------------------------------------------------------------
 Brighten = Win32API.new("uabm.dll", "Brighten", "li", "v")
 Darken = Win32API.new("uabm.dll", "Darken", "li", "v")
 Invert = Win32API.new("uabm.dll", "Invert", "l", "v")
 Grayscale = Win32API.new("uabm.dll", "Grayscale", "l", "v")
 #--------------------------------------------------------------------------
 # * Brighten
 #--------------------------------------------------------------------------
 def brighten(amount)
  Brighten.call(self.__id__, amount)
 end
 #--------------------------------------------------------------------------
 # * Darken
 #--------------------------------------------------------------------------
 def darken(amount)
  Darken.call(self.__id__, amount)
 end
 #--------------------------------------------------------------------------
 # * Invert
 #--------------------------------------------------------------------------
 def invert
  Invert.call(self.__id__)
 end
 #--------------------------------------------------------------------------
 # * Grayscale
 #--------------------------------------------------------------------------
  def grayscale
   Grayscale.call(self.__id__)
  end
end