![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 21 Pomógł: 0 Dołączył: 4.09.2008 Ostrzeżenie: (20%) ![]() ![]() |
mam taki problem co sie dzieje na kazdym serwerze jako uzywam. Testowalem w darmowych serwerach kod php i za kazdym razem mi sie taki blad pokazuje.
Cytat Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/a8487159/public_html/resizejpeg.php on line 11 a kod php gdzie jest kod wyglada mniej wiecej taki Kod 8-list($width, $height) = getimagesize($file); 9-$new_width = $sze; 10-$new_height = $wys; 11-$image_p = imagecreatetruecolor($new_width, $new_height); czy ktos moze mi powiedziec o co chodzi z tym imagecreatetruecolor?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (znaczy czytalem cos na temat tego imagecreatetruecolor na stronie phpclasses i na stronie php.pl ale nadal nie jasne (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) wiecie jak to naprawic?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) to raz. A 2 jest to ze pozniej jak chcialbym zapisac obrazek na kompie to zamiast zapisac tego obrazka np w formacie .jpeg to mi sie zapisuje jako php oO (IMG:http://forum.php.pl/style_emoticons/default/blinksmiley.gif) nie za bardzo rozumiem. Folder gdzie obrazki sa pochowane nazywa sie upload i dalem chmod 777. a kod php do tego wyglada tak Kod $data_obrazka = date('jmyhis'); $katalog='upload/'; $name = $katalog.$data_obrazka.'_'.$userfile_name; $dir = $userfile; if (move_uploaded_file($dir,$name)){ echo('<img src="resizejpeg.php?file='.$name.'&jakosc=85&szerokosc='.$_POST['szerokosc'].'&wysokosc='.$_POST['wysokosc'].'">'); kolega mi powiedzial ze cos tam z biblioteka. Moze ktos tez mi wyjasni co i jak zeby bylo mozna zapisac obrazek na kompie?? Dziekuje bardzo (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 21 Pomógł: 0 Dołączył: 4.09.2008 Ostrzeżenie: (20%) ![]() ![]() |
Cytat (wydaje mi sie ze podajesz zla sciezke do pliku) Mam dobra sciezke (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) dam tutaj caly kod tego resizejpeg.php
a do upload fotki: upload.php
a z form mam
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?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) a jesli bede mial serwer wlasny czy mozna skonfigorowac tego GD2 (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) bo wtedy niby blad nie bedzie sie pojawil |
|
|
![]() ![]() |
![]() |
Aktualny czas: 14.10.2025 - 21:01 |