Posted on January 18th, 2007 at 10:35 pm by Andrew
Hmm well it seems the blog is filled with lists of pictures at the mo and it means the whole site lags when you load it (annoying!!) so I'll have to get posting some content!
First off here's a weird upside-down text on an image script I stole/modified for Matt Jones and will never use again:
PHP:
-
<?php
-
if($_GET['text']) {
-
$size = imagettfbbox($s,0,"porkh.ttf",$text);
-
$xpad=9;
-
$ypad=9;
-
$im = imagecreate($dx+$xpad,$dy+$ypad);
-
$blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
-
$black = ImageColorAllocate($im, 0,0,0);
-
$white = ImageColorAllocate($im, 255,255,255);
-
ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
-
ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
-
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "porkh.ttf", $text);
-
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "porkh.ttf", $text);
-
// my one modified line
-
$im = imagerotate($im, "180", 0);
-
// wasn't that hawt?!
-
ImageGif($im);
-
ImageDestroy($im);
-
} else {
-
?>
-
<form action="index.php" method="get">
-
<input type="text" name="text" value="Your Message Here!"/>
-
<input type="submit" name="submit" value="Upside downy!"/>
-
</form>
-
<?
-
}
-
?>