getAvatar(); $avatar['ext'] = strtolower(substr($avatar['image'], -3)); //---------------------------------- // Create Images //---------------------------------- $image = imagecreatefrompng('themes/digg/background.png'); switch($avatar['ext']) { case 'png': $avatar = imagecreatefrompng($avatar['image']); break; case 'jpg': $avatar = imagecreatefromjpeg($avatar['image']); break; case 'gif': $avatar = imagecreatefromgif($avatar['image']); break; } //---------------------------------- // Set colors and fonts //---------------------------------- foreach($sig['colors'] as $color => $rgb) { $text['color'][$color] = imagecolorallocate($image, $rgb['r'], $rgb['g'], $rgb['b']); } foreach($sig['font'] as $fontn => $file) { $font[$fontn] = $file; } //---------------------------------- // Design Image //---------------------------------- //Header imagettftext($image, 12, 0, 15, 27, $text['color']['white'], $font['digg'], $user->getUserName()); //Digg me imagettftext($image, 15, 0, 35, 73, $text['color']['brown'], $font['arial'], '0'); imagettftext($image, 8, 0, 20, 117, $text['color']['blue'], $font['arial'], 'digg me'); //Left Column Labels imagettftext($image, 10, 0, 80, 60, $text['color']['orange'], $font['arial'], 'Real Name:'); imagettftext($image, 10, 0, 80, 77, $text['color']['orange'], $font['arial'], 'Location:'); imagettftext($image, 10, 0, 80, 95, $text['color']['orange'], $font['arial'], 'Rank:'); imagettftext($image, 10, 0, 80, 112, $text['color']['black'], $font['arial'], 'Last Dugg:'); //Left Column imagettftext($image, 10, 0, 157, 60, $text['color']['blue'], $font['arial'], $user->getName()); imagettftext($image, 10, 0, 137, 77, $text['color']['blue'], $font['arial'], $user->getLocation()); imagettftext($image, 10, 0, 120, 95, $text['color']['blue'], $font['arial'], $user->getRank()); imagettftext($image, 10, 0, 80, 130, $text['color']['blue'], $font['arial'], $user->getLastDugg()); //Right Colum Labels imagettftext($image, 10, 0, 270, 60, $text['color']['orange'], $font['arial'], 'Stories Submitted:'); imagettftext($image, 10, 0, 270, 77, $text['color']['orange'], $font['arial'], 'Stories Dugg:'); imagettftext($image, 10, 0, 270, 95, $text['color']['orange'], $font['arial'], 'Profile Views:'); //Right Column imagettftext($image, 10, 0, 382, 60, $text['color']['blue'], $font['arial'], $user->getSubmitted()); imagettftext($image, 10, 0, 354, 77, $text['color']['blue'], $font['arial'], $user->getDuggCount()); imagettftext($image, 10, 0, 354, 95, $text['color']['blue'], $font['arial'], $user->getViews()); //Avatar imagecopymerge($image, $avatar, 364, 2, 0, 0, 48, 35, 100); //---------------------------------- // Uptput/Destroy Image //---------------------------------- imagejpeg($image, $file); imagejpeg($image); imagedestroy($image); ?>