Warning: getimagesize(./data/upimages/550141215771208.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/sitek1/public_html/news/inc/images.mdu on line 836Tutaj wklejam część kodu odpowiedzialną (wg. mnie) za ten błąd:
Kod
//////////////////////
//Function: make_thumb
//Creates a thumbnail
//////////////////////
function make_thumb($src, $dest, $new_size, $way) {
global $type;
$size = getimagesize($src);
$img_width = $size[0];
$img_height = $size[1];
if(($img_width > $new_size) or ($img_height > $new_size)){
//Keep dimensions
if($way == "normal"){
$ratio = $new_size/$img_width;
$new_width = $new_size;
$new_height = $img_height*$ratio;
$off_w = 0;
$off_h = 0;
}
//Crop
else {
if($img_width > $img_height){
$new_width = $new_size;
$new_height = $new_size;
$off_w = ($img_width-$img_height)/2;
$off_h = 0;
$img_width = $img_height;
}
else if ($img_height > $img_width){
$new_width = $new_size;
$new_height = $new_size;
$off_w = 0;
$off_h = ($img_height - $img_width)/2;
$img_height = $img_width;
}
else{
$new_width = $new_size;
$new_height = $new_size;
$off_w = 0;
$off_h = 0;
}
}
if (strtolower($type) == "gif") {
$im_in = @imagecreatefromgif($src);
}
else {
$im_in = @imagecreatefromjpeg($src);
}
$im_out = @imagecreatetruecolor($new_width, $new_height);
@imagecopyresampled($im_out, $im_in, 0, 0, $off_w, $off_h, $new_width, $new_height, $img_width, $img_height);
}
else {
@copy($src, $dest);
}
if (strtolower($type) == "gif") {
@imagegif($im_out, $dest);
}
else {
@imagejpeg($im_out, $dest);
}
}
//Function: make_thumb
//Creates a thumbnail
//////////////////////
function make_thumb($src, $dest, $new_size, $way) {
global $type;
$size = getimagesize($src);
$img_width = $size[0];
$img_height = $size[1];
if(($img_width > $new_size) or ($img_height > $new_size)){
//Keep dimensions
if($way == "normal"){
$ratio = $new_size/$img_width;
$new_width = $new_size;
$new_height = $img_height*$ratio;
$off_w = 0;
$off_h = 0;
}
//Crop
else {
if($img_width > $img_height){
$new_width = $new_size;
$new_height = $new_size;
$off_w = ($img_width-$img_height)/2;
$off_h = 0;
$img_width = $img_height;
}
else if ($img_height > $img_width){
$new_width = $new_size;
$new_height = $new_size;
$off_w = 0;
$off_h = ($img_height - $img_width)/2;
$img_height = $img_width;
}
else{
$new_width = $new_size;
$new_height = $new_size;
$off_w = 0;
$off_h = 0;
}
}
if (strtolower($type) == "gif") {
$im_in = @imagecreatefromgif($src);
}
else {
$im_in = @imagecreatefromjpeg($src);
}
$im_out = @imagecreatetruecolor($new_width, $new_height);
@imagecopyresampled($im_out, $im_in, 0, 0, $off_w, $off_h, $new_width, $new_height, $img_width, $img_height);
}
else {
@copy($src, $dest);
}
if (strtolower($type) == "gif") {
@imagegif($im_out, $dest);
}
else {
@imagejpeg($im_out, $dest);
}
}
Szukałem pomocy na innych forach ale nic nie udało mi się znaleźć. Prosiłbym o pomoc.