Ik heb het volgende script van webmonkey af geripped om me gd te testen
zo krijg ik netjes een
als ik
eruit haal dan werkt ie wel (netjes een zwart/wit vierkant) verdana.ttf staat in de zelfde dir als het php scrippie..
wie weet wat er mis gaat..
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| <? //Send a header to the browser indicating //that this is a PNG image. //Remember to never send anything //to the browser before the header, //unless you're just itching for an error. header("Content-type: image/png"); //create a new image called $image, 200 by 200 pixels $width = 200; $height = 200; $image = imagecreate($width, $height); //Allocate some colors. $white = imagecolorallocate($image, 255, 255, 255); $black = imagecolorallocate($image, 0, 0, 0); //Fill in the entire image with a white background. //Note that the first two arguments (after the //image name) are the X and Y coordinates of //the upper left corner of the rectangle, //the second two are the coordinates of the lower //right corner, and the last argument is the fill color imagefilledrectangle($image, 10, 10, 180, 180, $black); //Write a message in black. //The arguments to ImageTTFText are, in order, //the image name, the height in pixels of the text, //the angle (starting at 0 for normal text, //and proceeding counterclockwise, //the X and Y coordinates of the starting point, //the color, the TrueType font file, and the //content of the text. imagettftext($image, 150, 0, 20, 110, $white, "verdana.ttf", "I love you!"); //Push the completed image out. imagepng($image); //Finally, free up the memory allocated for the image. imagedestroy($image); ?> ?> |
zo krijg ik netjes een
als ik PHP:
1
2
3
| <? imagettftext($image, 150, 0, 20, 110, $white, "verdana.ttf", "I love you!"); ?> |
eruit haal dan werkt ie wel (netjes een zwart/wit vierkant) verdana.ttf staat in de zelfde dir als het php scrippie..
wie weet wat er mis gaat..