06-04-2010, 03:55 AM
Update: New version out with a bunch of new methods.
Thanks for all of the compliments everybody! This will probably wind up being my summer project, so if you have anything you'd like to request, I'm more than happy to (attempt) putting it in.
As for the radial blur, its possible but fairly difficult. As soon as I figure out Crosseye, radial blur should be far easier.
v0.9
Version v0.9
http://www.box.net/shared/9m54d8hkzu
http://www.box.net/shared/9m54d8hkzu
Code:
Â
#==============================================================================
# ** Additional Bitmap Methods
#------------------------------------------------------------------------------
# Â By Untra and Glitchfinder
# Â 6/3/10
# Â v0.9
#==============================================================================
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")
 Hcontrast = Win32API.new("uabm.dll", "Hcontrast", "l", "v")
 Monochrome = Win32API.new("uabm.dll", "Monochrome", "l", "v")
 Emboss = Win32API.new("uabm.dll", "Emboss", "l", "v")
 Sepia = Win32API.new("uabm.dll", "Sepia", "l", "v")
 Sharpen = Win32API.new("uabm.dll", "Sharpen", "l", "v")
 Soften = Win32API.new("uabm.dll", "Soften", "l", "v")
 #--------------------------------------------------------------------------
 # * Brighten (0...255)
 #--------------------------------------------------------------------------
 def brighten(amount)
  Brighten.call(self.__id__, amount)
 end
 #--------------------------------------------------------------------------
 # * Darken (0...255)
 #--------------------------------------------------------------------------
 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
 #--------------------------------------------------------------------------
 # * Hyper Contrast
 #--------------------------------------------------------------------------
 def hyper_contrast
  Hcontrast.call(self.__id__)
 end
 #--------------------------------------------------------------------------
 # * Monochrome
 #--------------------------------------------------------------------------
 def monochrome
  Monochrome.call(self.__id__)
 end
 #--------------------------------------------------------------------------
 # * Emboss {buggy}
 #--------------------------------------------------------------------------
 def emboss
  Emboss.call(self.__id__)
 end
 #--------------------------------------------------------------------------
 # * Sepia
 #--------------------------------------------------------------------------
 def sepia
  Sepia.call(self.__id__)
 end
 #--------------------------------------------------------------------------
 # * Sharpen {will update with numeric value options}
 #--------------------------------------------------------------------------
 def sharpen
  Sharpen.call(self.__id__)
 end
 #--------------------------------------------------------------------------
 # * Soften {will update with numeric value options}
 #--------------------------------------------------------------------------
 def soften
  Soften.call(self.__id__)
 end
end
Thanks for all of the compliments everybody! This will probably wind up being my summer project, so if you have anything you'd like to request, I'm more than happy to (attempt) putting it in.
As for the radial blur, its possible but fairly difficult. As soon as I figure out Crosseye, radial blur should be far easier.