示例#1
0
 public function __construct($ruta)
 {
     $this->rutaTemporal = 'public/pacientesFotografiasTemp/';
     $this->rutaAGuardar = 'public/pacientesFotografias/';
     parent::__construct($ruta);
     list($ancho, $alto, $tipo) = getimagesize($this->ruta);
     if ($tipo !== IMAGETYPE_JPEG) {
         throw new \Exception("No es imagen JPG");
     }
     // inicializar
     $this->imgOrigen = imagecreatefromjpeg($this->ruta);
     $this->ancho = $ancho;
     $this->alto = $alto;
     $this->tipo = $tipo;
     $this->haSidoRecortada = false;
 }