Se a qualcuno può interessare, ho risolto sostituendo la funzione imagecreate con imagecreatetruecolor ed ora tutto è ok!
Ciao!!