<?php

//$im = imagecreate(50, 17);

if (eregi("$.png", $_GET["picture"]) || eregi("$.PNG", $_GET["picture"])) {

header("Content-type: image/png");

$im = ImageCreateFromPNG($_GET['picture']);

} else if (eregi("$.jpg", $_GET["picture"]) || eregi("$.jpeg", $_GET["picture"]) || eregi("$.JPG", $_GET["picture"]) || eregi("$.JPEG", $_GET["picture"])) {

header("Content-type: image/jpeg");

$im = ImageCreateFromJPEG($_GET['picture']);

} else if (eregi("$.gif", $_GET["picture"]) || eregi("$.GIF", $_GET["picture"])) {

header("Content-type: image/gif");

$im = ImageCrewateFromGIF($_GET['picture']);

} else {

print "ERROR! (Failurecode: 40482)";

}


//$bg = imagecolorallocate($im, 235, 235, 235);
//$bg = imagecolorallocate($im, 023, 045, 067);

$white = imagecolorallocate($im, 255, 255, 255);
$green = imagecolorallocate($im, 0, 255, 0);
$blue = imagecolorallocate($im, 0, 0, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
$red = imagecolorallocate($im, 255, 0, 0);
$yellow = imagecolorallocate($im, 255, 255, 0);


imagettftext($im, 9, 0, 0, 0, $grey, $font, "Upload.brorfilur.dk");


imagepng($im);
imagedestroy($im);
?> 