![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
27/10/2009, 13:09
|
![Avatar de zaetoner](http://static.forosdelweb.com/customavatars/avatar204055_7.gif) | | | Fecha de Ingreso: noviembre-2007 Ubicación: La ciudad de México
Mensajes: 607
Antigüedad: 17 años, 2 meses Puntos: 30 | |
Respuesta: ayuda con upload.php o subir.php si antes de guardarla quieres crearte un thumbnail puedes usar este codigo
$fuentemuychica=imagecreatefromjpeg($fotosubir);
$imganchomuychica=imagesx($fuentemuychica);
$imgaltomuychica=imagesy($fuentemuychica);
$anchomuychica=50; qui pones el ancho de la foto pequeña y el programa redimenciona para que no quede desproporcionada
$altomuychica=($imgaltomuychica*$anchomuychica/$imganchomuychica);
$imagenmuychica = imagecreatetruecolor($anchomuychica,$altomuychica) ;
imagecopyresampled($imagenmuychica,$fuentemuychica ,0,0,0,0,$anchomuychica,$altomuychica,$imganchomuy chica,$imgaltomuychica);
ob_start();
imagejpeg($imagenmuychica);
$fotomuychica = ob_get_contents();
ob_end_clean();
$fotomuychica = str_replace('##','\#\#',mysql_escape_string($fotom uychica));
__________________ ... |