Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/10/2009, 20:00
Avatar de zaetoner
zaetoner
 
Fecha de Ingreso: noviembre-2007
Ubicación: La ciudad de México
Mensajes: 607
Antigüedad: 17 años, 3 meses
Puntos: 30
Respuesta: Tamaño máximo De imagenes en editorres WYSIWYG

con este codigo puesdes redimencionarla
Código PHP:
$fuentemuychica=imagecreatefromjpeg($fotosubir);

$imganchomuychica=imagesx($fuentemuychica);

$imgaltomuychica=imagesy($fuentemuychica);

$anchomuychica=50;

$altomuychica=($imgaltomuychica*$anchomuychica/$imganchomuychica);

$imagenmuychica imagecreatetruecolor($anchomuychica,$altomuychica);

imagecopyresampled($imagenmuychica,$fuentemuychica,0,0,0,0,$anchomuychica,$altomuychica,$imganchomuychica,$imgaltomuychica);

ob_start();


imagejpeg($imagenmuychica);

$fotomuychica ob_get_contents();

ob_end_clean();

$fotomuychica str_replace('##','\#\#',mysql_escape_string($fotomuychica)); 
fijate en esta varialbe
$anchomuychica=50;
aqui seleccionas el ancho maximo y el programa te redimenciona lo alto para que se vean bien la proporciones.

saber de que tamaño es la imagen
Código PHP:
$imganchomuychica=imagesx($ESTA ES LA IMAGEN);

$imgaltomuychica=imagesy($ESTA ES LA IMAGEN); 
esto te dice llos tamaños luego con un if secillo te das cuenta de que tamaño es
__________________
...