Skip to content

Instantly share code, notes, and snippets.

@Noxn
Created August 15, 2010 12:48
Show Gist options
  • Save Noxn/525459 to your computer and use it in GitHub Desktop.
Save Noxn/525459 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'mini_magick'
require 'Win32API'
img = MiniMagick::Image.from_file("wallpaper.jpg")
#texty = "'Stuff'"
texty = "'#{gets.chomp}'"
img.combine_options do |c|
#c.gravity 'SouthWest'
c.draw "text 50,900 #{texty}"
c.pointsize '60'
#c.font '-*-helvetica-*-r-*-*-18-*-*-*-*-*-*-2'
c.fill("#990000")
end
img.write("newwallpaper.bmp")
desktop = Win32API.new("user32", "SystemParametersInfo", ['L','L','P','L'] , 'L')
desktop.Call(20,0,"newwallpaper.bmp",0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment