dynamic text as gif

F

Florian Weber

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
 
K

Kaspar Schiess

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBZal/Fifl4CA0ImQRAmOyAKCJoxfqwp9zDupBq14mq0ovw2XPSgCgoGIv
5CjtQHMAC+ibjH4WYZMjdYw=
=QAjz
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top