yii\imagine\BaseImage::getThumbnailBox PHP Method

getThumbnailBox() protected static method

Returns box for a thumbnail to be created. If one of the dimensions is set to null, another one is calculated automatically based on width to height ratio of original image box.
Since: 2.0.4
protected static getThumbnailBox ( Imagine\Image\BoxInterface $sourceBox, integer $width, integer $height ) : Imagine\Image\BoxInterface
$sourceBox Imagine\Image\BoxInterface original image box
$width integer thumbnail width
$height integer thumbnail height
return Imagine\Image\BoxInterface thumbnail box
    protected static function getThumbnailBox(BoxInterface $sourceBox, $width, $height)
    {
        if ($width !== null && $height !== null) {
            return new Box($width, $height);
        }
        return self::getBox($sourceBox, $width, $height, false);
    }