system/Validation/FileRules.php
public function max_dims(string $blank = null, string $params, array $data): bool
	{
		// Grab the file name off the top of the $params
		// after we split it.
		$params = explode(',', $params);
		$name   = array_shift($params);

		$file = $this->request->getFile($name);

		if (is_null($file))
		{
			return false;
		}

		// Get Parameter sizes
		$allowedWidth  = $params[0] ?? 0;
		$allowedHeight = $params[1] ?? 0;

		// Get uploaded image size
		$info       = getimagesize($file->getTempName());
		$fileWidth  = $info[0];
		$fileHeight = $info[1];

		return $fileWidth <= $allowedWidth && $fileHeight <= $allowedHeight;
	}
public function max_dims(string $blank = null, string $params, array $data): bool
	{
		// Grab the file name off the top of the $params
		// after we split it.
		$params = explode(',', $params);
		$name   = array_shift($params);

		$file = $this->request->getFile($name);

		if (is_null($file))
		{
			return false;
		}

		// Get Parameter sizes
		$allowedWidth  = $params[0] ?? 0;
		$allowedHeight = $params[1] ?? 0;

		// Get uploaded image size
		$info       = getimagesize($file->getTempName());
		$fileWidth  = $info[0];
		$fileHeight = $info[1];

		return $fileWidth <= $allowedWidth && $fileHeight <= $allowedHeight;
	}
Checks an uploaded file to verify that the dimensions are within
a specified allowable dimension.

@param string|null $blank
@param string      $params
@param array       $data

@return boolean