File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/modules/main/lib/ui/viewer/renderer/image.php
Back
<?php namespace Bitrix\Main\UI\Viewer\Renderer; use Bitrix\Main\Engine\Response\ResizedImage; class Image extends Renderer { const WIDTH = 1920; const HEIGHT = 1080; const JS_TYPE_IMAGE = 'image'; public function getWidth() { return $this->getOption('width', self::WIDTH); } public function getHeight() { return $this->getOption('height', self::HEIGHT); } public function getOriginalImage() { return $this->getOption('originalImage'); } public static function getJsType() { return self::JS_TYPE_IMAGE; } public static function getAllowedContentTypes() { return [ 'image/gif', 'image/jpeg', 'image/webp', 'image/bmp', 'image/png', ]; } public function render() { $imageFile = $this->getOriginalImage(); if (!$imageFile) { return null; } $resizedImage = new ResizedImage($imageFile, $this->getWidth(), $this->getHeight()); $resizedImage->setResizeType(BX_RESIZE_IMAGE_PROPORTIONAL); return $resizedImage; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings