Alecoaq
08-12-2006, 01:21
Ho un problemino... devo fare un sistema di gestione immagini, MA, a quanto pare, il mio host non mi mette a disposizione le librerie GD.
Ho provato a mettere il codice:
1) list($width, $height, $type, $attr) = getimagesize('images/screenshots/drowawind.JPG');
2)$thumb = @imagecreate(50, 100)
or die("Cannot Initialize new GD image stream");
3)$source = imagecreatefromjpeg('images/screenshots/drowawind.JPG');
4)imagecopyresized($thumb, $source, 0, 0, 0, 0, 100, 80, $width, $height);
5)imagejpeg($thumb, 'images/drowawind_thumb.JPG', 75);
però alla seconda istruzione si blocca [non la esegue]. Penso che manchino le gd.. come faccio?
[in sostanza devo creare una immagine ridotta, delle dimensioni da me assegnate]
Ho provato a mettere il codice:
1) list($width, $height, $type, $attr) = getimagesize('images/screenshots/drowawind.JPG');
2)$thumb = @imagecreate(50, 100)
or die("Cannot Initialize new GD image stream");
3)$source = imagecreatefromjpeg('images/screenshots/drowawind.JPG');
4)imagecopyresized($thumb, $source, 0, 0, 0, 0, 100, 80, $width, $height);
5)imagejpeg($thumb, 'images/drowawind_thumb.JPG', 75);
però alla seconda istruzione si blocca [non la esegue]. Penso che manchino le gd.. come faccio?
[in sostanza devo creare una immagine ridotta, delle dimensioni da me assegnate]