public function getExpectedSize($round = true)
	{
		if (empty($this->sourceFilename)) {
			throw new ImageProcessorException('Source image is not set');
		}
		if (empty($this->targetWidth) || ($this->targetWidth <= 0)) {
			throw new ImageProcessorException('Target width is not set or is invalid');
		}
		if (empty($this->targetHeight) || ($this->targetHeight <= 0)) {
			throw new ImageProcessorException('Target height is not set or is invalid');
		}

		$imageInfo = $this->getImageInfo($this->sourceFilename);

		$wRatio = max($imageInfo->getWidth() / $this->targetWidth, 1);
		$hRatio = max($imageInfo->getHeight() / $this->targetHeight, 1);

		if ( ! $this->cropMode) {
			$wRatio = $hRatio = max($wRatio, $hRatio);
		}

		$dimensions = array(
			'width' => $imageInfo->getWidth() / $wRatio,
			'height' => $imageInfo->getHeight() / $hRatio,
		);

		if ($round) {
			$dimensions = array_map('round', $dimensions);
		}

		return $dimensions;
	}
public function getExpectedSize($round = true)
	{
		if (empty($this->sourceFilename)) {
			throw new ImageProcessorException('Source image is not set');
		}
		if (empty($this->targetWidth) || ($this->targetWidth <= 0)) {
			throw new ImageProcessorException('Target width is not set or is invalid');
		}
		if (empty($this->targetHeight) || ($this->targetHeight <= 0)) {
			throw new ImageProcessorException('Target height is not set or is invalid');
		}

		$imageInfo = $this->getImageInfo($this->sourceFilename);

		$wRatio = max($imageInfo->getWidth() / $this->targetWidth, 1);
		$hRatio = max($imageInfo->getHeight() / $this->targetHeight, 1);

		if ( ! $this->cropMode) {
			$wRatio = $hRatio = max($wRatio, $hRatio);
		}

		$dimensions = array(
			'width' => $imageInfo->getWidth() / $wRatio,
			'height' => $imageInfo->getHeight() / $hRatio,
		);

		if ($round) {
			$dimensions = array_map('round', $dimensions);
		}

		return $dimensions;
	}
public function getExpectedSize ( $ round = true ) { if ( empty ( $ this -> sourceFilename ) ) { throw new ImageProcessorException ( 'Source image is not set' ) ; } if ( empty ( $ this -> targetWidth ) || ( $ this -> targetWidth <= 0 ) ) { throw new ImageProcessorException ( 'Target width is not set or is invalid' ) ; } if ( empty ( $ this -> targetHeight ) || ( $ this -> targetHeight <= 0 ) ) { throw new ImageProcessorException ( 'Target height is not set or is invalid' ) ; } $ imageInfo = $ this -> getImageInfo ( $ this -> sourceFilename ) ; $ wRatio = max ( $ imageInfo -> getWidth ( ) / $ this -> targetWidth , 1 ) ; $ hRatio = max ( $ imageInfo -> getHeight ( ) / $ this -> targetHeight , 1 ) ; if ( ! $ this -> cropMode ) { $ wRatio = $ hRatio = max ( $ wRatio , $ hRatio ) ; } $ dimensions = array ( 'width' => $ imageInfo -> getWidth ( ) / $ wRatio , 'height' => $ imageInfo -> getHeight ( ) / $ hRatio , ) ; if ( $ round ) { $ dimensions = array_map ( 'round' , $ dimensions ) ; } return $ dimensions ; }
Get expected dimensions of processed image
@return array
Get expected dimensions of processed image