Cytat
(wydaje mi sie ze podajesz zla sciezke do pliku)
Mam dobra sciezke

dam tutaj caly kod tego resizejpeg.php
<?php
$file = $_GET['file'];
$jakosc = $_GET['jakosc'];
$sze = $_GET['szerokosc'];
$wys = $_GET['wysokosc'];
$new_width = $sze;
$new_height = $wys;
$image_p = imagecreatetruecolor($new_width, $new_height);
preg_match("|.([a-z0-9]{2,4})$|i", $file, $fileSuffix); {
case "jpg"<span style="color: #007700":
header('Content-typ: image/jpeg'); $image = imagecreatefromjpeg($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg($image_p, null, $jakosc);
break;
case "png"<span style="color: #007700":
header('Content-typ: image/png'); $image = imagecreatefrompng($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagepng($image_p, null, $jakosc);
break;
case "gif"<span style="color: #007700":
header('Content-typ: image/gif'); $image = imagecreatefromgif($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagegif($image_p, null, $jakosc);
}
?>
a do upload fotki:
upload.php<?php
include('resizejpeg.php');
if($_POST['R1'] == "V1")
{
// $userfile - miejsce tymczasowej lokalizacji pliku na serwerze WWW
$userfile = $_FILES['userfile']['tmp_name'];
// $userfile_name - nazwa pliku w systemie uzytkownika
$userfile_name = $_FILES['userfile']['name'];
// $userfile_size - wielkosc pliku w bajtach
$userfile_size = $_FILES['userfile']['size'];
// $userfile_type - typ pliku w systemie MIME, np. image/gif
$userfile_type = $_FILES['userfile']['type'];
// $userfile_error - kod bledu zwiazanego z wysylaniem pliku
$userfile_error = $_FILES['userfile']['error'];
if($userfile_error == UPLOAD_ERR_OK){
if ($userfile_type != 'image/jpeg' &&
$userfile_type != 'image/png' &&
$userfile_type != 'image/bmp' &&
$userfile_type != 'image/gif'){
$blad='Typ pliku jest b3edny. Mo?na umieszczaa tylko *jpg, *gif, *png lub *bmp.';
}
$data_obrazka = date('jmyhis'); $katalog='upload/';
$name = $katalog.$data_obrazka.'_'.$userfile_name;
$dir = $userfile;
echo('<img src="resizejpeg.php?file='.$name.'&jakosc=85&szerokosc='.$_POST['szerokosc'].'&wysokosc='.$_POST['wysokosc'].'">');
} else {$blad = 'Nie udano wrzucic zdjecia na serwer ';}
} else {$blad = 'Inny blad ';} }
if($_POST['R1'] == "V2")
{
echo('<img src="resizejpeg.php?file='.$_POST['userfile1'].'&jakosc=85&szerokosc='.$_POST['szerokosc'].'&wysokosc='.$_POST['wysokosc'].'">'); }
?>
a z form mam
<form method="POST" enctype="multipart/form-data" action="upload.php">
czytalem na stronie php o tym imagecolor. Ten blad co mi wyskakuje za kazdym razem jak uploaduje fotki.
Cytat
Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/a8487159/public_html/resizejpeg.php on line 11
no i pisza tak.
Cytat
imagecreatetruecolor() returns an image identifier representing a black image of the specified size.
Depending on your PHP and GD versions this function is defined or not. With PHP 4.0.6 through 4.1.x this function always exists if the GD module is loaded, but calling it without GD2 being installed PHP will issue a fatal error and exit. With PHP 4.2.x this behaviour is different in issuing a warning instead of an error. Other versions only define this function, if the correct GD version is installed.
wiec pytanie czy to wina serwera ktora nie jest platna?

a jesli bede mial serwer wlasny czy mozna skonfigorowac tego GD2

bo wtedy niby blad nie bedzie sie pojawil