PHP/Graphics Image/imagesetpixel — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 10:05, 26 мая 2010
Points and Lines
<source lang="html4strict">
<?php
$width = 255; $height = 255; $image = imagecreatetruecolor($width, $height); for ($i = 0; $i <= $width; ++$i) { for ($j = 0; $j <= $height; ++$j) { $col = imagecolorallocate($image, 255, $i, $j); imagesetpixel($image, $i, $j, $col); } } header("Content-type: image/png"); imagepng($image); imagedestroy($image);
?>
</source>