".SYSTEM_ROOT."images/nodes/".substr($node['node_id'],0,1)."/".substr($node['node_id'],1,1)."/".$node['node_id'].".gif"; // workaround by mifo: if (stristr($image_name,".jpg") || stristr($image_name,".jpeg")) $orig = imagecreatefromjpeg($image_tmp); if (stristr($image_name,".gif")) $orig = imagecreatefromgif($image_tmp); if ($orig) { $orig_x = imagesx($orig); $orig_y = imagesy($orig); // if ($orig_x > $width) $image_x = $width; $image_y = round(($orig_y * $image_x) / $orig_x); $image = imagecreatetruecolor($image_x, $image_y); imagecopyresampled($image, $orig, 0, 0, 0, 0, $image_x, $image_y, $orig_x, $orig_y); // echo $output_image; imagegif($image, $output_image); } } //if ($cmd) { // shell_exec($cmd); //} } } return true; } ?>