$_height_min_)) { $new_h = $_height_min_; $new_w = (int)($imagedata[0]*($new_h/$imagedata[1])); } if($_GET["show"] == "full") { if($_width_max_) { if($imagedata[0]<$_width_max_) { $new_w = $imagedata[0]; $new_h = $imagedata[1]; } else { $new_w = $_width_max_; $new_h = (int)($imagedata[1]*($new_w/$imagedata[0])); } } else { $new_w = $imagedata[0]; $new_h = $imagedata[1]; } } if(strtolower(substr($_GET[img],-3)) == "jpg") { header("Content-type: image/jpg"); $dst_img=ImageCreate($new_w,$new_h); $src_img=ImageCreateFromJpeg($_image_); $dst_img = imagecreatetruecolor($new_w, $new_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img)); $img = Imagejpeg($dst_img,'', $_quality_); } if(substr($_GET[img],-3) == "gif") { header("Content-type: image/gif"); $dst_img=ImageCreate($new_w,$new_h); $src_img=ImageCreateFromGif($_image_); ImagePaletteCopy($dst_img,$src_img); ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img)); $img = Imagegif($dst_img,'', $_quality_); } ?>