core-bundle/src/Resources/contao/library/Contao/File.php
public function resizeTo($width, $height, $mode='')
	{
		if (!$this->isImage)
		{
			return false;
		}

		$return = System::getContainer()
			->get('contao.image.image_factory')
			->create($this->strRootDir . '/' . $this->strFile, array($width, $height, $mode), $this->strRootDir . '/' . $this->strFile)
			->getUrl($this->strRootDir)
		;

		if ($return)
		{
			$this->arrPathinfo = array();
			$this->arrImageSize = array();
		}

		return $return;
	}
public function resizeTo($width, $height, $mode='')
	{
		if (!$this->isImage)
		{
			return false;
		}

		$return = System::getContainer()
			->get('contao.image.image_factory')
			->create($this->strRootDir . '/' . $this->strFile, array($width, $height, $mode), $this->strRootDir . '/' . $this->strFile)
			->getUrl($this->strRootDir)
		;

		if ($return)
		{
			$this->arrPathinfo = array();
			$this->arrImageSize = array();
		}

		return $return;
	}
Resize the file if it is an image

@param integer $width  The target width
@param integer $height The target height
@param string  $mode   The resize mode

@return boolean True if the image could be resized successfully