src/Object/MediaObject.php
protected function _adjustDimensions($type, $fromType, $fromLength) {
		$currentLength = $this->getAttributes($type);
		$currentFromLength = $this->getAttributes($fromType);

		$ratio = $fromLength / $currentFromLength;
		$newLength = $currentLength * $ratio;

		$this->setAttribute($type, (int)$newLength);
	}
protected function _adjustDimensions($type, $fromType, $fromLength) {
		$currentLength = $this->getAttributes($type);
		$currentFromLength = $this->getAttributes($fromType);

		$ratio = $fromLength / $currentFromLength;
		$newLength = $currentLength * $ratio;

		$this->setAttribute($type, (int)$newLength);
	}
protected function _adjustDimensions ( $ type , $ fromType , $ fromLength ) { $ currentLength = $ this -> getAttributes ( $ type ) ; $ currentFromLength = $ this -> getAttributes ( $ fromType ) ; $ ratio = $ fromLength / $ currentFromLength ; $ newLength = $ currentLength * $ ratio ; $ this -> setAttribute ( $ type , ( int ) $ newLength ) ; }
Auto-adjusts one dimension from the other to keep the current ratio.

@param string $type
@param string $fromType
@param int $fromLength
@return void
Auto - adjusts one dimension from the other to keep the current ratio .