Generates an image tag with circle.
@param string $src the image URL.
@param string $alt the alternative text display.
@param array $htmlOptions additional HTML attributes.
@return string the generated image tag.
354031
public static function imageCircle($src, $alt = '', $htmlOptions = array())
    {
        $htmlOptions['type'] = self::IMAGE_TYPE_CIRCLE;
        return self::image($src, $alt, $htmlOptions);
    }
903336
private static function resizeImage(array $src = [], array $dst = [], array $options = []): void
    {
        $srcImg = $src['function']($src['file']);
        $dstImg = \imagecreatetruecolor($dst['size']['w'], $dst['size']['h']);

        if (\in_array($src['type'], [IMAGETYPE_GIF, IMAGETYPE_PNG])) {
            $trIdx = \imagecolortransparent($srcImg);

            if ($trIdx > 0) {
                $trData = \imagecolorsforindex($srcImg, $trIdx);
                $background = \imagecolorallocate($dstImg, $trData['red'], $trData['green'], $trData['blue']);
                \imagefill($dstImg, 0, 0, $background);
                \imagecolortransparent($dstImg, $background);
            } elseif ($src['type'] == IMAGETYPE_PNG) {
                \imagealphablending($dstImg, false);
                $background = \imagecolorallocatealpha($dstImg, 0, 0, 0, 127);
                \imagefill($dstImg, 0, 0, $background);
                \imagesavealpha($dstImg, true);
            }
        }

        \imagecopyresampled(
            $dstImg,
            $srcImg,
            0,
            0,
            $dst['size']['src-box']['x'],
            $dst['size']['src-box']['y'],
            $dst['size']['w'],
            $dst['size']['h'],
            $dst['size']['src-box']['w'],
            $dst['size']['src-box']['h']
        );

        if ($options['gs'] === true) {
            \imagefilter($dstImg, IMG_FILTER_GRAYSCALE);
        }

        if (Directory::exists(\dirname($dst['file'])) === false) {
            Directory::create(\dirname($dst['file']));
        }

        $dst['function']($dstImg, $dst['file'], $dst['quality']);
    }
1237875
public function RenderAlternate($AltAppFolder, $AltController, $AltMethod) {
      $this->AddAsset('Content', $this->FetchView($AltMethod, $AltController, $AltAppFolder));
      $this->RenderMaster();
      return;
   }
692166
public function tag($name, Array $options = array(), $content = null, $open = false)
    {
        if (!$name) {
            return '';
        }
        $htmlOptions = '';
        foreach ($options as $key => $value) {
            $htmlOptions .= ' ' . $key . '="' . \htmlspecialchars($value, \ENT_COMPAT) . '"';
        }
        if ($content !== null) {
            return '<' . $name . $htmlOptions . '>' . $content . '</' . $name . '>';
        } else {
            return '<' . $name . $htmlOptions . (($open) ? '>' : ' />');
        }
    }
53856
protected function prepareImage($picture, $alt = '') {
    $value = NULL;
    $files = $this->loadByUuid('file', $picture);

    if ($files instanceof File) {
      $value = [
        [
          'target_id' => $files->id(),
          'alt' => $alt ?: 'file' . $files->id(),
        ],
      ];
    }

    return $value;
  }
362245
public static function activeTextArea($model, $attribute, $htmlOptions = array())
    {
        $htmlOptions = self::normalizeInputOptions($htmlOptions);
        return parent::activeTextArea($model, $attribute, $htmlOptions);
    }
136981
public static function image($src, $alt = null, $attribs = array())
    {
        $attribs = array_merge(array('src'=>$src), $attribs);
        if ($alt) {
            $attribs['alt'] = htmlentities($alt);
        }
        
        return self::tag('img', null, $attribs);
    }
971999
public function autoOrient(string $src, string $dst)
    {
        if (!$dst) {
            $dst=$src;
        }
        return $this
        ->image($src)
        ->autoOrient()
        ->toFile($dst);
    }
993158
public static function image($url, $alt = null, $attributes = array(), $secure = null)
    {
        $html = self::getInstance()->html;
        $args = func_get_args();
        return call_user_func_array(array($html, __FUNCTION__), $args);
    }
507530
public function HTMLToImage($html, GrabzItImageOptions $options = null)
	{
		if ($options == null)
		{
			$options = new GrabzItImageOptions();			
		}		

		$this->request = new GrabzItRequest($this->getRootUrl(true) . GrabzItClient::TakePicture, true, $options, $html);
	}
478916
public static function imagePolaroid($src, $alt = '', $htmlOptions = array())
    {
        $htmlOptions['type'] = self::IMAGE_TYPE_POLAROID;
        return self::image($src, $alt, $htmlOptions);
    }
1279330
public static function img($src, $alt = '', array $attributes = [])
    {
        $attributes = array_merge([
            'src' => $src,
            'alt' => $alt
        ], $attributes);

        return self::tag('img', $attributes);
    }
446288
public function imageTag($source, $alt = null, $attributes = [])
    {
        $assetsOptions = ['host' => array_pull($attributes, 'host', $this->assetsHost)];

        // E.g. image_tag('logo.png', "My Logo"); => <img src="http://localhost/assets/logo-f2331bb588d007ba354e5fa406f9f4aa.png" alt="My Logo">
        $alt = $alt ?: humanize(basename($source, ".".File::extension($source)));

        return app('html')->image($this->assetPath($source, $assetsOptions), $alt, $attributes);
    }
760026
public static function img($attr = null)
    {
        if (is_string($attr)) {
            $attr = array('src' => $attr);
        }

        return self::tag('img', $attr + array('alt' => ''), null, array_merge(self::$common_attrib,
            array('src','alt','width','height','border','usemap','onclick','onerror','onload')));
    }
1096798
public function image($url, $alt = null, $options = [])
    {
        $options['alt'] = $alt;

        return '<img src="'.$this->_generator->asset($url).'"'.self::attributes($options).'>';
    }
105716
public static function media($image, $heading, $content, $htmlOptions = array())
    {
        $tag = TbArray::popValue('tag', $htmlOptions, 'div');
        self::addCssClass('media', $htmlOptions);
        $linkOptions = TbArray::popValue('linkOptions', $htmlOptions, array());
        TbArray::defaultValue('pull', self::PULL_LEFT, $linkOptions);
        $imageOptions = TbArray::popValue('imageOptions', $htmlOptions, array());
        self::addCssClass('media-object', $imageOptions);
        $contentOptions = TbArray::popValue('contentOptions', $htmlOptions, array());
        self::addCssClass('media-body', $contentOptions);
        $headingOptions = TbArray::popValue('headingOptions', $htmlOptions, array());
        self::addCssClass('media-heading', $headingOptions);
        $items = TbArray::popValue('items', $htmlOptions);

        $output = self::openTag($tag, $htmlOptions);
        $alt = TbArray::popValue('alt', $imageOptions, '');
        $href = TbArray::popValue('href', $linkOptions, '#');
        if (!empty($image)) {
            $output .= self::link(parent::image($image, $alt, $imageOptions), $href, $linkOptions);
        }
        $output .= self::openTag('div', $contentOptions);
        $output .= self::tag('h4', $headingOptions, $heading);
        $output .= $content;
        if (!empty($items)) {
            $output .= self::medias($items);
        }
        $output .= '</div>';
        $output .= self::closeTag($tag);
        return $output;
    }
1350150
public function to_html($indent = 0, $extraargs = array()) {
        if (!$this->display) {
            return '';
        }
        $tabs = str_repeat("\t", $indent);

        if (isset($this->children)) {
            $childrenhtml = $this->children->to_html($indent+1, $extraargs);
        } else {
            $childrenhtml = '';
        }
        return $this->item_html($extraargs).'&nbsp;'.(join($this->icons, '')).(($childrenhtml !='')?("\n".$childrenhtml):'');
    }