![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
07/10/2003, 23:55
|
![Avatar de mveraa](http://static.forosdelweb.com/customavatars/avatar29282_1.gif) | | | Fecha de Ingreso: diciembre-2002 Ubicación: santiago-chilito
Mensajes: 1.931
Antigüedad: 22 años, 1 mes Puntos: 2 | |
hola te mando este scritp funciona bien en mi pc , pon ojo en la ruta absoluta de tu server ..
echo "codigo:$patente<BR>";
$NOMBRE_FILE=$patente.".jpg"; /* varible que viene en este caso de otra pag.
//HACE LOS THUMBNAIL
ECHO $NOMBRE_FILE;
$altura=125;
$dir_thu="c:/php/www/pruebaconsubirfotos/t"; /*ruta absuluta*/
$nombre=$NOMBRE_FILE;
$camino="";
$prefijo_thumb="_1"; // $nombre;
$img=@imagecreatefromjpeg($nombre) or die("no pude ");
$datos=getimagesize($nombre) or die ("problemas");
$ratio=($datos[1]/$altura);
$anchura=round($datos[0]/$ratio);
$thumb=imagecreate($anchura,$altura) OR DIE ("NO PUDE CREARLA");
imagecopyresized($thumb,$img,0,0,0,0,$anchura,$alt ura,$datos[0],$datos[1])OR DIE ("NO PUEDE DIMENSIONAR");
/*imagejpeg($thumb,$camino,$dir_thu.$prefijo_thumb. $nombre) OR DIE ("NO SE PUDO");;*/
imagejpeg($thumb,$dir_thu.$prefijo_thumb.$nombre);
echo "MINIATURA CREADA!!!";
?>
saludos.. |