code: public function resize($width = false, $height = false)
      {
          if (!$width && !$height) {
              throw new \Exception('Please, provide at least $width or $height for resize');
          }
          $result = clone $this;
          $result->operations[]['resize'] = array(
              'width' => $width,
              'height' => $height,
          );
          return $result;
      }
docs: Get object with resized parameters.
  Provide width or height or both.
  If not width or height are provided exceptions will be thrown!
  
  @param int|boolean $width Resized image width. Provide false if you resize proportionally.
  @param int|boolean $height Resized image height. Provide false if you resize proportionally.
  @throws \Exception
  @return File