i am running:
php 4.3.4
Apache/1.3.29 (Win32) PHP/4.3.4
and here is the code im trying to run: yet nothing shows up...
<?php
header("Content-type: image/jpeg");
require("functions.php");
//load image
$imageLocation = "LondonDigitalOne_MikeLoiselle.jpg";
$path = "./test/test.jpg";
$im = @imagecreatefromjpeg($imageLocation);
//set background color
$bgColor = imagecolorallocate($im, 255, 255, 255);
//set all other attributes
$fontSize = 25;
$angle = 0;
$font = "ARIALBD.TTF";
$text = "Mike Loiselle";
//cover old text
imagefilledrectangle ($im, 210, 30, 480, 60, $bgColor);
//calculate text size for output
$fontAtt = imagettfbbox($fontSize, $angle, $font, $text);
$fixedFontAtt = fontAttributes($fontAtt);
$imageAtt = getimagesize($imageLocation);
$locationX = (($imageAtt[0]/2)-($fixedFontAtt[0]/2));
$locationY = (($imageAtt[1]/2)+($fixedFontAtt[1]/2));
//set text color and write text
$color = imagecolorallocate($im, 0, 0, 113);
imagettftext($im, $fontSize, $angle, round($locationX), round($locationY)-35, $color, $font, $text);
imagejpeg($im,$path);
imagejpeg($im);
imagedestroy($im);
?>
now i know that i need to install the true type library...which im not 100% sure on how to do but the image should still show up yet its not...it gives me the broken link to an image picture. please help!