|
Online Subscribe to Feed Archives Feed ![]() Other ![]()
|
Sat, 14 Oct 2006
Oct 14, 2006, 11:13
[home/perl_scripts] If you want to convert the signature data to a .png file (using GD Library and the signature data) for any reason, a petition user has written a script which fits the bill. His name is Tino, and here’s his script: $signature is the signature data. You can use this in your pages: <img src=”signature.php”> where signature.php is the name of the code above. Cool eh? Thanks Tino!
Petition PHP Script
<?php
header (“Content-type: image/png” );
$signature = “39 40 39 40”;
$points = explode(” “, $signature);
$image = imagecreate(250, 65);
$bgcolor = imagecolorallocate($image, 255, 255, 255);
$color = imagecolorallocate($image, 0, 0, 0);
for ($x = 0; $x < count($points) - 2; $x = $x + 2) imageline($image, $points[$x], $points[$x + 1], $points[$x + 2], $points[$x + 3], $color);
imagepng($image);
imagedestroy($image);
?>
~Jason
[technorati]
[permalink]
[feed]






