All pastes #478802 Raw Edit

omeg

public php v1 · immutable
·published 2007-05-09 11:35 UTC
rendered paste body
<?phpfunction make_image(){	$dx = 512;	$dy = 512;	$image = imageCreate($dx, $dy);	$colors[0] = imageColorAllocate($image, 0, 0, 0);	$colors[1] = imageColorAllocate($image, 255, 255, 255);	for ($y=0;  $y<$dy;  $y++)	{		for ($x=0;  $x<$dx;  $x++)		{		    if (($x & $y) != 0)			    imageSetPixel($image, $x, $y, $colors[0]);			else			    imageSetPixel($image, $x, $y, $colors[1]);		}	}	header("Content-type:  image/jpeg");	imageJPEG($image);}set_time_limit(0);make_image();?>