İnternet Programlama Dersi – 1 (Güz-2017) Hafta – 12 – 3

<?php
/**
 * Created by PhpStorm.
 * User: caglar
 * Date: 13.12.2017
 * Time: 19:38
 */

$filename="test.jpg";
$im = imagecreate(500, 500);
imagecolorallocate($im, 255, 255, 255);

$renk=imagecolorallocate($im,0,0,0);
imageline($im,0,500,500,0,$renk);

imageline($im,0,0,500,500,$renk);
imageline($im,250,0,250,500,$renk);
imageline($im,0,250,500,250,$renk);

imagejpeg($im,$filename);
imagedestroy($im);

echo "Dosya olusturuldu!";

 

Share