yii\imagine\BaseImage::isUpscaling PHP Method

isUpscaling() protected static method

Checks if upscaling is going to happen
protected static isUpscaling ( Imagine\Image\BoxInterface $sourceBox, Imagine\Image\BoxInterface $destinationBox ) : boolean
$sourceBox Imagine\Image\BoxInterface
$destinationBox Imagine\Image\BoxInterface
return boolean
    protected static function isUpscaling(BoxInterface $sourceBox, BoxInterface $destinationBox)
    {
        return $sourceBox->getWidth() <= $destinationBox->getWidth() && $sourceBox->getHeight() <= $destinationBox->getHeight() || !$destinationBox->getWidth() && !$destinationBox->getHeight();
    }