S
Sternenwandererin
Guest
* Generate Image
*/
$tweet = base64_decode($tweet);
$image = imagecreatefrompng("tweet.png");
if (!$image) {
die();
}
$size = 10;
$black = imagecolorallocate($image, 255, 255, 255);
$white = imagecolorallocate($image, 204, 204, 204);
$y = -3;
$max = 50;
imagettftext($image , $size , 0 , 30 , 160+$y , $white , 'Prototype.ttf' , $follow );
$y = $y + 40;
for ($i=0; $i < strlen($tweet); $i = $i + $max) {
imagettftext($image , $size , 0 , 10 , 30+$y , $black , 'Prototype.ttf' , substr($tweet, $i, $max) );
$y = $y + 14;
}
_____
Dick -> Wichtig zu ändern!
Du musst die Font natürlich aufm Server haben.
*/
$tweet = base64_decode($tweet);
$image = imagecreatefrompng("tweet.png");
if (!$image) {
die();
}
$size = 10;
$black = imagecolorallocate($image, 255, 255, 255);
$white = imagecolorallocate($image, 204, 204, 204);
$y = -3;
$max = 50;
imagettftext($image , $size , 0 , 30 , 160+$y , $white , 'Prototype.ttf' , $follow );
$y = $y + 40;
for ($i=0; $i < strlen($tweet); $i = $i + $max) {
imagettftext($image , $size , 0 , 10 , 30+$y , $black , 'Prototype.ttf' , substr($tweet, $i, $max) );
$y = $y + 14;
}
_____
Dick -> Wichtig zu ändern!
Du musst die Font natürlich aufm Server haben.