Convert text into a png image using GD without using WikiPluginCached. The images are stored in a private <PHPWIKI_DIR>/images/<LANG> subdirectory instead, which are not timestamp checked at all. Delete the .png file(s) if you change anything.

This is a really simple and stupid plugin, which might need some work.

Usage

  <?plugin text2png text="some text" ?>

Arguments

text
some text to display
lang
language subdirectory
_force
set to 1 to recreate the image
fontsize
18. with GD1 it's the pixelsize, with GD2 the pointsize
with_shadow
1
fontcolor
  1. 000000
shadowcolor
  1. AFAFAF
backcolor
  1. ffffff

Configurable Options

See the sourcecode. You'd probably need to adjust $ttfont and text2png_debug.

Example

<?plugin text2png text='Hello WikiWorld!' ?>

would produce:

See Also

Help:TeX2PngPlugin, Help:TexToPngPlugin


PhpWikiDocumentation Help:WikiPlugin

lib/plugin/text2png.php (In template 'body' < 'html'):125 Notice[8]: Undefined variable: l

lib/plugin/text2png.php (In template 'body' < 'html'):128 Notice[8]: Undefined variable: l

lib/plugin/text2png.php (In template 'body' < 'html'):136 Warning[2]: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied

lib/plugin/text2png.php (In template 'body' < 'html'):137 Warning[2]: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied

lib/plugin/text2png.php (In template 'body' < 'html'):166 Warning[2]: imagettfbbox() [<a href='function.imagettfbbox'>function.imagettfbbox</a>]: Could not find/open font

Valid XHTML 1.0! Valid CSS!
Page Execution took real: 0.301, user: 0.120, sys: 0.030 seconds , Memory: 9655728

lib/plugin/text2png.php (In template 'body' < 'html'):183 Warning[2]: imagettftext() [<a href='function.imagettftext'>function.imagettftext</a>]: Could not find/open font

lib/plugin/text2png.php (In template 'body' < 'html'):188 Warning[2]: imagettftext() [<a href='function.imagettftext'>function.imagettftext</a>]: Could not find/open font