Answer the question
In order to leave comments, you need to log in
Resizing images in Bitrix by exact dimensions?
Good afternoon, I'm using CFile::ResizeImageGet with BX_RESIZE_IMAGE_EXACT, but the whole problem is that it crops a non-perfect pixel as specified in width/height:
$resize = CFile::ResizeImageGet($photo, array("width" => 875, "height" => 530), BX_RESIZE_IMAGE_EXACT, true);
CFile::ShowImage($resize['src'], 875, 530, "", "", true);
Answer the question
In order to leave comments, you need to log in
Try this:
<?
$renderImage = "";
$renderImage = CFile::ResizeImageGet( $arItem["PREVIEW_PICTURE"]["ID"], Array("width" => 875, "height" => 530), BX_RESIZE_IMAGE_EXACT, true);
?> <img src = " <?=$renderImage["src"] ? > " >
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question