buona domenica a tutti voi.
ho questo pezzetto di codice che, una volta fatto l'upload del file, crea la thumbnails per l'immagine:
Codice PHP:
if ($_FILES['userfile']['type'] == 'image/bmp') {
$source = imagecreatefromwbmp($file);
imagecopyresized($thumbnail, $source, 0, 0, 0, 0, 100, 80, $larghezza, $altezza);
imagewbmp($thumbmail, '../' . $tuna, 4);
}
però ad ogni invio di un file immagine .bmp fallisce col seguente errore:
Warning: imagecreatefromwbmp(): 'http://localhost/progetto/files/foto.bmp' is not a valid WBMP
Warning: imagecopyresized() expects parameter 2 to be resource, boolean given in...
So che il supporto a wbmp è attivo da GD >1.8 ma io ho le GD 2.0
Grazie