Created
November 12, 2012 03:25
-
-
Save elvuel/4057324 to your computer and use it in GitHub Desktop.
Using mini_magick(IM) draw text with shadow effect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'mini_magick' | |
image = MiniMagick::Image.open('blank.jpg') | |
image.combine_options do |c| | |
c.gravity 'Center' | |
c.pointsize '22' | |
c.draw "text 3,3 'Ruby'" | |
c.fill 'blue' | |
c.draw "text 0,0 'Ruby'" | |
c.fill 'gray' | |
end | |
image.write('text_with_shadow_spike.jpg') | |
puts "ok" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yay thanks, I just used this as a hello world to test out mini_magick for http://github.com/mungojelly/polyglot-etude :)