Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/10/2010, 13:24
Avatar de jcxnet
jcxnet
 
Fecha de Ingreso: octubre-2005
Ubicación: Perú
Mensajes: 784
Antigüedad: 18 años, 6 meses
Puntos: 56
Respuesta: Tamaño de imagenes en miniatura

Este cálculo está basado en el ancho definido para la imagen:
Código PHP:
        if ($width>$maxWidth){
            if (
$width $height) {
            
$percentage = ($maxWidth $width);
            } else {
            
$percentage = ($maxWidth $height);
            }
            
            
$width round($width $percentage);
            
$height round($height $percentage); 
        } 
saludos
__________________
►I'm a devil on the run ♂
Jcxnet.com
*Keep It Simple **