Created
January 25, 2011 17:05
-
-
Save midu/795224 to your computer and use it in GitHub Desktop.
create thumnail w/ submission ID + type
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
# recipes | |
h = {904=>"Vegetable", | |
1105=>"Grains", | |
770=>"Grains", | |
971=>"Vegetable", | |
837=>"Legumes" | |
# , ... | |
} | |
# create watermak | |
i = 1 | |
h.each_pair do |id, type| | |
puts "#{id} - #{i}/#{h.size}" | |
begin | |
eval "`convert -pointsize 14 -density 100 -background transparent -font Helvetica label:\"##{id} / #{type}\" #{id}/thumb.png`" | |
rescue | |
puts "oh :(" | |
end | |
i = i+1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working on eZImageEditor ? :)