grazie mariox per la tua risposta.
ho abilitato GD2.dll
Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in c:\archivos de programa\easyphp\www\lafattoria\include\img.class. php on line 160
img.class.php
Codice PHP:
function resize_max($max_w="",$max_h=""){
if($this->_x==0||$this->_y==0) return FALSE;
else {
if($this->_x>$max_w||$this->_y>$max_h){
$scale = min($max_w/$this->_x, $max_h/$this->_y);
$img_width = (int)($this->_x*$scale);
$img_height = (int)($this->_y*$scale);
$newimg=imagecreatetruecolor($img_width,$img_height); //imagecreatetruecolor GD2
$ok=imagecopyresampled($newimg,$this->_img,0,0,0,0,$img_width,$img_height,$this->_x,$this->_y); //imagecopyresampled GD2
$this->_x=$img_width;
$this->_y=$img_height;
if($ok==FALSE) return FALSE;
else {
$this->_img=$newimg;
return TRUE;
}
} else {
$newimg=imagecreatetruecolor($this->_x,$this->_y); //imagecreatetruecolor GD2
$ok=imagecopyresampled($newimg,$this->_img,0,0,0,0,$this->_x,$this->_y,$this->_x,$this->_y); //imagecopyresampled GD2
if($ok==FALSE) return FALSE;
else {
$this->_img=$newimg;
return TRUE;
}
}
}
}
le righe commentante sono il problema.
Boo.... ci proviamo a risolverlo.
Grazie
ripeto: on-line funziona a meraviglia, era solo per capire meglio.