hi!
does anybody of you know of a lib which generates a gif or a png
out of a dynamic text and lets me specify font and font size for it?
it shouldnt be very complicated with rmagick, but i just dont wanna
reinvent the wheel...
thanks!
ciao!
florian
Florian Weber wrote:
does anybody of you know of a lib which generates a gif or a png
out of a dynamic text and lets me specify font and font size for it?
it shouldnt be very complicated with rmagick, but i just dont wanna
reinvent the wheel...
Do use RMagick ! (excerpt from text.rb in examples:)
~ #!c:/unix/ruby/bin/ruby -w
~ require 'RMagick'
~ imgl = Magick::ImageList.new
~ imgl.new_image(190,190)
~ sample = Magick::Draw.new
~ sample.stroke('transparent')
~ sample.font_family('times')
~ sample.pointsize(24)
~ sample.font_style(Magick::NormalStyle)
~ sample.text(20,40, 'NormalStyle')
~ # (...)
~ sample.draw(imgl)
~ imgl.write('text.gif')
best regards,
- --
kaspar
semantics & semiotics
code manufacture
www.tua.ch/ruby