Bon, j'ai changé de host pour voir
et maintenant j'ai des print d'erreur (pratic)
Pour ce code (qui marche avec easyphp last version):
//Generate Mini:
$theimage = "gfx_pack/$name2/original.png";
$w = imagesx($theimage);
$h = imagesy($theimage);
$im = imagecreatefrompng($theimage);
// crée l'image de sortie
$im2 = imagecreatetruecolor($w/2,$h/2);
//imagealphablending($im2,false);
// remplit l'image de sortie
imagecopyresampled($im2,$im,0,0,0,0,$w/2,$h/2,$w,$h);
imagecolortransparent($im2,imagecolorallocate($im2,255,0,140));
// affiche l'image
//header("Content-type: image/x-png" );
$name="gfx_pack/$name2/preview.png";
if(imagepng($im2,$name))
{}
else
{print("error $name<BR>" );}
print("Preview Done<BR>" );
J'ai:
Warning: imagesx(): supplied argument is not a valid Image resource in c:\domains\seganet.com.br\wwwroot\trpg_e\index5.php on line 17
Warning: imagesy(): supplied argument is not a valid Image resource in c:\domains\seganet.com.br\wwwroot\trpg_e\index5.php on line 18
Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in c:\domains\seganet.com.br\wwwroot\trpg_e\index5.php on line 21
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in c:\domains\seganet.com.br\wwwroot\trpg_e\index5.php on line 24
Warning: imagecolorallocate(): supplied argument is not a valid Image resource in c:\domains\seganet.com.br\wwwroot\trpg_e\index5.php on line 25
Warning: imagecolortransparent(): supplied argument is not a valid Image resource in c:\domains\seganet.com.br\wwwroot\trpg_e\index5.php on line 25
Warning: imagepng(): supplied argument is not a valid Image resource in c:\domains\seganet.com.br\wwwroot\trpg_e\index5.php on line 29
error gfx_pack/g_wrld01/preview.png
Preview Done