Ejemplo n.º 1
0
 /**
  * Calculates the new image dimensions
  * 
  * These calculations are based on both the provided dimensions and $this->maxWidth and $this->maxHeight
  * 
  * @param int $width
  * @param int $height
  */
 protected function calcImageSize($width, $height)
 {
     parent::calcImageSize($width, $height);
     if ($this->newDimensions['newWidth'] == 0) {
         $this->newDimensions['newWidth'] = 1;
     }
     if ($this->newDimensions['newHeight'] == 0) {
         $this->newDimensions['newHeight'] = 1;
     }
     return $this->newDimensions;
 }