<?php // twórz płótno 200x200 $img = imagecreatetruecolor(200, 200); // biały i zielony $white = imagecolorallocate($img, 255, 255, 255); $black = imagecolorallocate($img, 0, 255, 0); // robimy zielony okrąg imagearc($img, 100, 100, 150, 150, 0, 360, $black); // robimy mniejszy, półokrąg - 180 stopni imagearc($img, 100, 100, 100, 100, 0, 180, $black); // wyświetlamy imagepng($img); // czyścimy imagedestroy($img); ?>
Plik zwraca mi treść: "Obrazek 'http://localhost/' nie może zostać wyświetlony, ponieważ zawiera błędy", a gdy wykasuje "header("Content-type: image/png");" zwraca krzaczki.
Wersja biblioteki GD: 2.0.35 .
array(12) {
["GD Version"]=>
string(27) "bundled (2.0.34 compatible)"
["FreeType Support"]=>
bool(true)
["FreeType Linkage"]=>
string(13) "with freetype"
["T1Lib Support"]=>
bool(false)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(true)
["JPEG Support"]=>
bool(true)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XPM Support"]=>
bool(true)
["XBM Support"]=>
bool(true)
["JIS-mapped Japanese Font Support"]=>
bool(false)
}
Używam Webserv i PSPad editor.