Author Topic: Text to image / Dynamic images  (Read 2781 times)

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1137
  • Selina is my Superstar
    • View Profile
    • Amuseum
Text to image / Dynamic images
« on: January 11, 2010, 03:40:47 PM »
Using gd library in PHP, you can put text into images. Can be used for various things, like latest lastfm or twitter status, etc. (TODO: try SVG with inline scripting and styling.)

last.fm
Code: [Select]
http://www.shenafu.com/imgd/lastfm/username.png
e.g.

http://www.shenafu.com/imgd/lastfm/amuseum.png


twitter
Code: [Select]
http://www.shenafu.com/imgd/twitter/username.png
e.g.

http://www.shenafu.com/imgd/twitter/maro254.png


Days Until
Code: [Select]
http://www.shenafu.com/imgd/daysuntil/yyyymmdd.png
e.g.

http://www.shenafu.com/imgd/daysuntil/20121110.png


Weather Forecast
Code: [Select]
http://www.shenafu.com/imgd/weather/place.pngwhere place can be city; city,state; city,country; zip code; airport; latitude,longitude; or 'local'

e.g.

http://www.shenafu.com/imgd/weather/sfo.png


Poems
Code: [Select]
http://www.shenafu.com/imgd/poem/genre_poemid_verseid.png
where genre is a valid available genre and poemid is out of accessible poems for that genre and verseid is out of max verses for that poem or song. If genre or poemid or verseid is not found, then it will be randomly selected.

Available genres and number of poems:
tang : 320
american : 12
kaytse : 49
kara : 1

e.g.






« Last Edit: December 23, 2013, 02:57:07 PM by Den »
Support me on Patreon

I saw. I conquered. I came.

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1137
  • Selina is my Superstar
    • View Profile
    • Amuseum
Image of the Day
« Reply #1 on: January 17, 2010, 02:42:56 PM »
Images of the Day

These SVG images are clickable, upon which a new window will open to the site. (SVGs are clickable only if contained within <object> tags.)

Code: [Select]
http://www.shenafu.com/imgd/daily/site.svg

Sites available, use code in first column (all lowercase):
nasa : http://www.nasa.gov/multimedia/imagegallery/iotd.html
osei : http://www.osei.noaa.gov/OSEIiod.html
epod : http://epod.usra.edu/
comic or comic_name: http://gocomics.com/name/
xkcd: http://xkcd.com/

e.g.
Code: [Select]
http://www.shenafu.com/imgd/daily/nasa.svg


Code: [Select]
http://www.shenafu.com/imgd/daily/comic_bc.svg


Code: [Select]
http://www.shenafu.com/imgd/daily/xkcd.svg

« Last Edit: March 30, 2012, 04:41:20 PM by Den »

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1137
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: Text to image / Dynamic images
« Reply #2 on: January 01, 2012, 09:31:05 PM »
From deck of KARA 5 suited deck, create a random poker hand. Changes hourly.
Code: [Select]
http://www.shenafu.com/imgd/kara5poker.png


Different animated gif on page refresh:
Code: [Select]
http://www.shenafu.com/imgd/kara5anim.gif
« Last Edit: April 03, 2012, 08:08:06 PM by Den »