Answer the question
In order to leave comments, you need to log in
Is it possible to crop one side with resizeimageget?
The woodenness of Bitrix strikes.
Can't do it like this:
<?php;
$renderImageG = CFile::ResizeImageGet($arUser_Photo,Array("width" => "254", "height" => "auto"), BX_RESIZE_IMAGE_PROPORTIONAL, true);
echo '<!--img alt="'.$arUser['WORK_COMPANY'].'" src="'.$renderImageG['src'].'" /-->';
?>
Answer the question
In order to leave comments, you need to log in
$arFile = CFile::GetFileArray($arUser_Photo);
$widthF = $arFile['WIDTH'];
$heightF = $arFile['HEIGHT'];
$procent = 254*100/$widthF;
$height = floor($heightF*$procent/100);
//$itog = ;
$renderImageG = CFile::ResizeImageGet($arUser_Photo,Array("width" => "254", "height" => $height), BX_RESIZE_IMAGE_PROPORTIONAL, true);
echo '<img alt="'.$arUser['WORK_COMPANY'].'" src="'.$renderImageG['src'].'" />';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question