|
|
|
ดูFunaction ย่อภาพให้หนอ่ยคับมัน ERROR มันขึ้น ERROR อย่างนี้อะครับ 0 : , 28521 Byte |
|
|
|
|
|
|
|
มันขึ้น ERROR อย่างนี้อะครับ
0 : , 28521 Byte image/pjpeg cc934f8c0e767713ce47561449fd97a3.jpg , ../pictures/album/small/0/cc934f8c0e767713ce47561449fd97a3.jpg
Fatal error: Call to undefined function imageCreateTrueColor() in C:\Inetpub\wwwroot\isn_in\admin\album_update.php on line 159
//////
$uploadDir = '../pictures/album/full/0/' ;
$thumbDir = '../pictures/album/small/0/' ;
Foreach ($_FILES["userfile"]["error"] as $key => $error) {
if ($error == 0 ) {
$title = trim($_REQUEST['title'][$key]) ;
$size = $_FILES["userfile"]["size"][$key];
$type = $_FILES["userfile"]["type"][$key];
$tmp_name = $_FILES["userfile"]["tmp_name"][$key];
$fname = $_FILES["userfile"]["name"][$key];
$fname = md5($fname).".jpg" ;
$uploadfile = $uploadDir . basename($fname);
$thumbfile = $thumbDir.$fname;
move_uploaded_file($tmp_name, "$uploadDir$fname");
echo "$key : $title , $size Byte $type $fname , $thumbfile<br> \n ";
list($w1, $h1) = getimagesize($uploadfile); // Get new dimensions
$quality = 85;
$w2 = 100 ; #
$percent = $w2 / $w1 ;
$h2 = $h1 * $percent ;
$h2 = 80 ; #
$percent = $h2 / $h1 ;
$w2 = $w1 * $percent ;
$w2 = 120 ; #
$h2 = 90 ; #
$im = imageCreateTrueColor($w2+4, $h2+4);
$im1 = imageCreateFromJpeg($uploadfile);
$dark = ImageColorAllocate($im,185,185,185); // dark
$light = ImageColorAllocate($im,230,230,230);
$white = ImageColorAllocate($im,254,254,254);
imagefilledRectangle($im, 0, 0, $w2+3 , $h2+3, $white);
imagefilledRectangle($im, 4, 4, $w2+4 , $h2+4, $light);
imagefilledRectangle($im, 3, 3, $w2+2 , $h2+2, $dark);
imageCopyResampled($im, $im1, 0, 0, 0, 0, $w2, $h2, $w1, $h1);
#imageCopyResized($im, $im1, 0, 0, 0, 0, $w2, $h2, $w1, $h1);
imagejpeg($im, $thumbfile , $quality); # %
imageDestroy($im);
imageDestroy($im1);
}
}
Tag : - - - -
|
|
|
|
|
|
Date :
28 พ.ค. 2550 20:53:19 |
By :
v |
View :
1591 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ชื่อฟังก์ชันมันไม่มีไม่ใช่หรือ?
|
|
|
|
|
Date :
28 พ.ค. 2550 23:29:48 |
By :
ravatna |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|