src/UI/Image/ThumbnailCreator.php
public function thumbizeByLimit( $width, $height )
	{
		if( !count( $this->size ) )
			throw new RuntimeException( 'No Source Image set.' );

		$ratio_s	= $this->size[0] / $this->size[1];
		$ratio_t	= $width / $height;
		if( ( $ratio_s / $ratio_t ) > 1 )
			$height	= ceil( $width / $ratio_s );
		else
			$width	= ceil( $height * $ratio_s );
		return $this->thumbize( $width, $height );
	}
public function thumbizeByLimit( $width, $height )
	{
		if( !count( $this->size ) )
			throw new RuntimeException( 'No Source Image set.' );

		$ratio_s	= $this->size[0] / $this->size[1];
		$ratio_t	= $width / $height;
		if( ( $ratio_s / $ratio_t ) > 1 )
			$height	= ceil( $width / $ratio_s );
		else
			$width	= ceil( $height * $ratio_s );
		return $this->thumbize( $width, $height );
	}
public function thumbizeByLimit ( $ width , $ height ) { if ( ! count ( $ this -> size ) ) throw new RuntimeException ( 'No Source Image set.' ) ; $ ratio_s = $ this -> size [ 0 ] / $ this -> size [ 1 ] ; $ ratio_t = $ width / $ height ; if ( ( $ ratio_s / $ ratio_t ) > 1 ) $ height = ceil ( $ width / $ ratio_s ) ; else $ width = ceil ( $ height * $ ratio_s ) ; return $ this -> thumbize ( $ width , $ height ) ; }
Resizes Image within a given Limit.
@access		public
@param		int			$width 		Largest Width of Target Image
@param		int			$height 	Largest Height of Target Image
@return		bool
Resizes Image within a given Limit .