Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/05/2010, 11:56
Avatar de facurouss
facurouss
 
Fecha de Ingreso: enero-2010
Mensajes: 101
Antigüedad: 14 años, 3 meses
Puntos: 0
Thumbnail (imagen en miniatura)

Bueno lo que yo quiero es que una imagen de una base de datos quede mas chiquita no..

Codigo
Código:
$query = "SELECT * FROM game ORDER BY id_game desc LIMIT 0,10";
$ress = mysql_query($query);
	while ($dato = mysql_fetch_array($ress)) {
		
$original = imagecreatefromjpeg('"swf/'.$dato[photo].'"');
$thumb = imagecreatetruecolor(150,150); 
$ancho = imagesx($original);
$alto = imagesy($original);
imagecopyresampled($thumb,$original,0,0,0,0,150,150,$ancho,$alto);
imagejpeg($thumb,'swf/$dato[photo]',90); 

echo '<a href="juegos.php?cod='.$dato[id_game].'"><h3>'.$dato[game].'</h3></a><br>';
echo '<img src="swf/'.$dato[photo].'"><br><br>';
	}

Pero que pasa me da este error:


Warning: imagecreatefromjpeg("swf/ninjapiro.jpg") [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /home/divertig/public_html/index.php on line 28

Warning: imagesx(): supplied argument is not a valid Image resource in /home/divertig/public_html/index.php on line 30

Warning: imagesy(): supplied argument is not a valid Image resource in /home/divertig/public_html/index.php on line 31

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/divertig/public_html/index.php on line 32

Alguien me podria ayudar a arreglar esto :S