AAAAhome/academiac/www/administrator/components/com_admirorgallery/scripts/thumbnailer.php000060400000004203151373436050025643 0ustar00 200){ $dst_w = 200; // KEEP HEIGHT, CROP WIDTH $src_w = $src_h*(200/$dst_h); $src_x = floor(($src_width-$src_w)/2); } @$dst_img = imagecreatetruecolor($dst_w, $dst_h); //PNG THUMBS WITH ALPHA PATCH if (preg_match("/png/i", $original_strtolower)) { // Turn off alpha blending and set alpha flag @imagealphablending($dst_img, false); @imagesavealpha($dst_img, true); } @imagecopyresampled($dst_img, $src_img, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); if (preg_match("/jpg|jpeg/i", $original_strtolower)) { @imagejpeg($dst_img); } else if (preg_match("/png/i", $original_strtolower)) { @imagepng($dst_img); } else if (preg_match("/gif/i", $original_strtolower)) { @imagegif($dst_img); } @imagedestroy($dst_img); @imagedestroy($src_img); ?>