A
A
Andrew Sky2015-07-08 16:17:34
PHP
Andrew Sky, 2015-07-08 16:17:34

Bitrix corrupts images when using CFile::ResizeImageGet?

Hi all. Not in the first project, Bitrix corrupts png images by adding various artifacts to them. This happens when using the CFile::ResizeImageGet function. How can this problem be corrected? Function example:

<?foreach($arResult['ITEMS'] as $arItem){
        $photo = CFile::ResizeImageGet($arItem['PREVIEW_PICTURE'], array('width'=>85, 'height'=>82), BX_RESIZE_IMAGE_PROPORTIONAL, true);?>
<?}?>

Result - prntscr.com/7q9c2y

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
che7ovek, 2016-11-23
@che7ovek

It might be worth trying something like this:
By default, Bitrix applies a sharpening filter to scalable images. An empty array overrides this behavior. Perhaps the problem is because of this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question