Ver Mensaje Individual
  #97 (permalink)  
Antiguo 05/08/2011, 14:50
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: [APORTE] Subir y redimensionar imagenes

Yo mejor usaria excepciones, de hecho en mi proyecto usa una clase diseñada por mi, para eso:
Código PHP:
Ver original
  1. try {
  2.        $image = new Gecko_Image('path/imagen.ext');
  3.        $image->resizeTo(500, 500);
  4.        $image->save();
  5. } catch (Gecko_Image_Exception $gex) {
  6.        echo "Ocurrio un error: " . $gex->getMessage();
  7. }

Uso __call() para descubrir los plugins (crop, resize, saturate) etc.