重複の可能性:
phpで生成されたギャラリーのサムネイルの読み込みが遅い
コードリンクはページの下部にあります。
このサイトは1and1.co.ukLinuxベースのシステムから実行されており、現在よりもはるかに高速にギャラリーをロードするのに十分です。
PHPで生成されたサムネイルの読み込みが少し遅いのですが、その理由を教えてください。
http://site-perf.com/cgi-bin/show.cgi?id=vz5le19Fp5E
コード: http ://satinaweb.com/tmp/functions.txt
ここにありcrop.php
ます:
$sourceimage = $_GET['a'];
function crop($sourceimage) {
// Draw & resize
header('Content-Type: $imsz[\'mime\']');
list($width, $height) = getimagesize($sourceimage);
if($width > $height){
$new_width = 100;
$new_height = 75;
} else {
$new_width = 75;
$new_height = 100;
}
$image = imagecreatefromjpeg($sourceimage);
$image_p = imagecreatetruecolor($new_width, $new_height);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg($image_p);
imagedestroy($image_p);
imagedestroy($image);
}
crop($sourceimage);
ご不明な点がございましたら、お問い合わせください!