TwistPHP Documentation

resizeContain

File path: dist/twist/Core/Models/Image/Image.model.php
Namespace: Twist\Core\Models\Image
Extends:

resizeContainKeeping the same aspect ratio as the original, contain the image within the width and height provided, any white space will be filled with the fill colour

Parameters

Name Type Description
$intContainerWidthintegern/a
$intContainerHeightintegern/a
[$strFillColour = ']stringn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$intContainerWidth 124;
$intContainerHeight 124;
$strFillColour ';

//Call the function resizeContain with the example vars
$resImage = new \Twist\Core\Models\Image\Image();
$resImage -> resizeContain($intContainerWidth, $intContainerHeight, $strFillColour);