View file dcsiza/pic.php

File size: 453B
<?
if(!isset($neww) || $neww=='')$neww=40;
if(!isset($newh) || $newh=='')$newh=40;
list(, , $type,)=getimagesize($file);
if ($type==1) {$funci="imagecreatefromgif";} //$funco="imagegif";}
if ($type==2) {$funci="imagecreatefromjpeg";} //$funco="imagejpeg";}
$im1 = $funci($file);
$im2=imagecreatetruecolor($neww,$newh);
imagecopyresized($im2, $im1, 0,0,0,0,$neww,$newh, imagesx($im1), imagesy($im1));
header("Content-type: image/png");
imagepng($im2);
?>