Font size bij imagestring()
Weet iemand hoe je de size van een font verandert bij imagestring()?
Wat ik heb nu dit:
Maar de grote van het lettertype is net iets te klein.
Voor een voorbeeld hoe het werkt check dit:
http://www.eliteavengers.w3b.be/code.php?x=ZeRoDeaD
of voer zelf een naam in na de ?x=...
Bij voorbat dank,
ZeRoDeaD
Wat ik heb nu dit:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
<?
$refferal = $_GET['x'];
$image = imagecreatefromjpeg("images/refferal-banner.jpg");
$bgColor = imagecolorallocate ($image, 255, 255, 255);
$textColor = imagecolorallocate ($image, 0, 0, 0);
imagestring ($image, 5, 80, 40, $refferal, $textColor);
header("Pragma: no-cache");
header('Content-type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
?>
$refferal = $_GET['x'];
$image = imagecreatefromjpeg("images/refferal-banner.jpg");
$bgColor = imagecolorallocate ($image, 255, 255, 255);
$textColor = imagecolorallocate ($image, 0, 0, 0);
imagestring ($image, 5, 80, 40, $refferal, $textColor);
header("Pragma: no-cache");
header('Content-type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
?>
Maar de grote van het lettertype is net iets te klein.
Voor een voorbeeld hoe het werkt check dit:
http://www.eliteavengers.w3b.be/code.php?x=ZeRoDeaD
of voer zelf een naam in na de ?x=...
Bij voorbat dank,
ZeRoDeaD
Gewijzigd op 11/08/2005 17:26:00 door Zero Dead
Ik heb ff op php.net gezocht, maar ik snap hier ff niks van:
imagefontwidth -- Get font width
Description
int imagefontwidth ( int font)
Returns the pixel width of a character in font.
En dan heb je ook nog dit:
imagefontheight -- Get font height
Description
int imagefontheight ( int font)
Returns the pixel height of a character in the specified font.
Ik heb dit al uitgeprobeert door bijv dit te doen(om het extra duidelijk te maken 600)
imagefontheight (600);
imagefontwidth (600);
imagefontwidth -- Get font width
Description
int imagefontwidth ( int font)
Returns the pixel width of a character in font.
En dan heb je ook nog dit:
imagefontheight -- Get font height
Description
int imagefontheight ( int font)
Returns the pixel height of a character in the specified font.
Ik heb dit al uitgeprobeert door bijv dit te doen(om het extra duidelijk te maken 600)
imagefontheight (600);
imagefontwidth (600);
Delete deze topic maar, heb al een andere oplossing...
Gewijzigd op 12/08/2005 19:13:00 door Zero Dead