Happy Easter Everyone!
And of course we have a little Easter egg for all of you. The Easter egg is a little PHP script.
$image = imagecreatetruecolor(400, 500);
$bg = imagecolorallocate($image, 10, 10, 150);
imagefill($image, 0, 0, $bg);
// allocate some colors
$white = imagecolorallocate($image, 255, 255, 255);
$grey = imagecolorallocate($image, 128, 128, 128);
$black = imagecolorallocate($image, 0, 0, 0);
// choose a color for the elipse
$col_ellipse = imagecolorallocate($image, 255, 200, 255);
// draw ellipse shadow
imagefilledellipse($image, 215, 265, 320, 400, $black);
// draw the ellipse
imagefilledellipse($image, 200, 250, 320, 400, $col_ellipse);
//draw arc where plastic egg opens
imagearc($image, 198, 235, 326, 100, 0, 180, $bg);
$colour = imagecolorallocate($image, 100, 0, 200);
$ca = rand(2,5);
$cb = rand(2,5);
$cc = rand(2,5);
$cd = rand(2,5);
${"colour".$ca} = imagecolorallocate($image, 153, 204, 255);
${"colour".$cb} = imagecolorallocate($image, 102, 0, 153);
${"colour".$cc} = imagecolorallocate($image, 204, 153, 204);
${"colour".$cd} = imagecolorallocate($image, 153, 0, 255);
//positions of stars relative to original position
$shift['x'][]=0; //star 1
$shift['y'][]=0;
$star['color'][] = $colour;
$shift['x'][]=-80; //star 2
$shift['y'][]=-120;
$star['color'][] = $colour2;
$shift['x'][]=-130; //star 3
$shift['y'][]=10;
$star['color'][] = $colour3;
$shift['x'][]=-10; //star 4
$shift['y'][]=-250;
$star['color'][] = $colour4;
$shift['x'][]=-160; //star 5
$shift['y'][]=-200;
$star['color'][] = $colour5;
for($ii=0; $ii < count($shift['x']); $ii++)
{
// set up array of points for polygon
$values = array(
230, 330,
290, 390,
280, 340,
240, 380,
310, 370,
230, 330
);
$shiftX = $shift['x'][$ii];
$shiftY = $shift['y'][$ii];
foreach ($values as &$val)
{
if($i == 1){ $val = $val+$shiftY; $i++; }
else
{ $val = $val+$shiftX; $i = 1; }
}
// draw a star filled in with a circle
imagefilledpolygon($image, $values, 6, $star['color'][$ii]);
imagefilledellipse($image, 273+$shiftX, 364+$shiftY, 35, 24, $star['color'][$ii]);
}//end for
// Rotate
$degrees = rand(0,360);
$image= imagerotate($image, $degrees, 0);
imagefilter($image, IMG_FILTER_MEAN_REMOVAL, 0);
imagefilter($image, IMG_FILTER_SMOOTH, 0);
//resize the image
$width = imagesx($image);
$height = imagesy($image);
if($height > 0) { $ratio = $width/$height; }
$rand = rand(25,75);
$perc = $rand/100;
$newwidth = $width * $perc;
$newheight = $height * $perc;
$image2 = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($image2, $image, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
header("Content-type: image/png");
imagepng($image2);
?>
Preview:

Try refreshing this page several times, the egg rotates and changes size! And once more, Happy Easter to everyone!