Informações sobre a imagem
@param  string $src Imagem de origem
@return array       Dados da imagem
490232
public function info(string $src)
    {
        $image=$this->image($src);
        $info['width']=$image->getWidth();
        $info['height']=$image->getHeight();
        $info['orientation']=$image->getOrientation();
        $info['mime']=$image->getMimeType();
        $info['exif']=$image->getExif();
        return $info;
    }
1211050
protected function injectConfig($src)
	{
		$config = array_map(
			[$this, 'encode'],
			$this->configOptimizer->optimize(
				[
					'plugins'        => $this->getPluginsConfig(),
					'registeredVars' => $this->getRegisteredVarsConfig(),
					'rootContext'    => $this->getRootContext(),
					'tagsConfig'     => $this->getTagsConfig()
				]
			)
		);

		$src = preg_replace_callback(
			'/(\\nvar (' . implode('|', array_keys($config)) . '))(;)/',
			function ($m) use ($config)
			{
				return $m[1] . '=' . $config[$m[2]] . $m[3];
			},
			$src
		);

		// Prepend the deduplicated objects
		$src = $this->configOptimizer->getVarDeclarations() . $src;

		return $src;
	}
34009
public function imagecopy(
        $src,
        $dst_x=0, $dst_y=0,
        $src_x=0, $src_y=0,
        $dst_w=null, $dst_h=null,
        $src_w=null, $src_h=null
    ) {
        $image_details = $this->build_image($src);

        if ($image_details !== false) {
            list($src, $src_width, $src_height) = $image_details;

            if (is_null($dst_w)) $dst_w = $this->width - $dst_x;
            if (is_null($dst_h)) $dst_h = $this->height - $dst_y;
            if (is_null($src_w)) $src_w = $src_width - $src_x;
            if (is_null($src_h)) $src_h = $src_height - $src_y;
            return imagecopy($this->image, $src, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);

        } else
            return false;
    }
500296
public function load($src = null, $dir = null)
    {
        if (isset($src)) {
            $this->setSource($src, $dir);
        }

        $this->loadImageDetails();

        if ($this->fileType === IMG_WEBP) {
            $this->image = imagecreatefromwebp($this->pathToImage);
        } else {
            $imageAsString = file_get_contents($this->pathToImage);
            $this->image = imagecreatefromstring($imageAsString);
        }
        if ($this->image === false) {
            throw new Exception("Could not load image.");
        }

        /* Removed v0.7.7
        if (image_type_to_mime_type($this->fileType) == 'image/png') {
            $type = $this->getPngType();
            $hasFewColors = imagecolorstotal($this->image);

            if ($type == self::PNG_RGB_PALETTE || ($hasFewColors > 0 && $hasFewColors <= 256)) {
                if ($this->verbose) {
                    $this->log("Handle this image as a palette image.");
                }
                $this->palette = true;
            }
        }
        */

        if ($this->verbose) {
            $this->log("### Image successfully loaded from file.");
            $this->log(" imageistruecolor() : " . (imageistruecolor($this->image) ? 'true' : 'false'));
            $this->log(" imagecolorstotal() : " . imagecolorstotal($this->image));
            $this->log(" Number of colors in image = " . $this->colorsTotal($this->image));
            $index = imagecolortransparent($this->image);
            $this->log(" Detected transparent color = " . ($index >= 0 ? implode(", ", imagecolorsforindex($this->image, $index)) : "NONE") . " at index = $index");
        }

        return $this;
    }
335365
public static function extract($src, $dst)
    {
        $result = false;

        $archive = \ezcArchive::open($src);
        $archive->extract($dst);
        $result = true;

        return $result;
    }
737296
protected function &getSource($src)
	{
		if (!isset($this->sources[$src]))
		{
			if (is_readable($src))
			{
				$this->sources[$src] = self::splitLines(file_get_contents($src));
			}
			else
			{
				$this->sources[$src] = null;
			}
		}

		return $this->sources[$src];
	}
253475
public function source($src)
    {
        $this->source = $this->getImageInfo($src);

        $type              = $this->source['type'];
        $createFrom        = 'ImageCreateFrom' . $type;
        $this->sourceImage = $createFrom($src);

        return $this;
    }
1280185
public function addAvatarImage($src, $alt="", $before=true) {
		$img=$this->addImage($src,$alt,$before);
		$img->setClass("ui image");
		$img->asAvatar();
		return $img;
	}
148247
public static function img($src, $attr = array())
	{
		if ( ! preg_match('#^(\w+://)# i', $src))
		{
			$src = \Uri::base(false).$src;
		}
		$attr['src'] = $src;
		$attr['alt'] = (isset($attr['alt'])) ? $attr['alt'] : pathinfo($src, PATHINFO_FILENAME);
		return html_tag('img', $attr);
	}
790855
public static function imageHtml($src, $alt = '', $width = 0, $height = 0)
    {
        return self::element('img', [
            'src' => $src,
            'alt' => $alt,
            'width' => ($width ?: null),
            'height' => ($height ?: null),
        ]);
    }
1283793
public function process($src) {
        $simple_parsed = parse_ini_string($src, true);
        $inheritance_parsed = $this->parseSections($simple_parsed);
        return $this->parseKeys($inheritance_parsed);
    }
700072
protected function preserveAlpha($dest, $src)
    {
        $transparent = @imagecolortransparent($src);
        if (-1 != $transparent) {
            $color = @imagecolorsforindex($src, $transparent);
            $allocated = @imagecolorallocatealpha(
                            $dest
                            , $color['red']
                            , $color['green']
                            , $color['blue']
                            , $color['alpha']
            );
            @imagecolortransparent($dest, $allocated);
            @imagefill($dest, 0, 0, $allocated);
        }
    }
755797
public function htmlImage($src, array $attributes = array()) {
        $attributes['src'] = $src;
        $html = '<img' . $this->_htmlAttribs($attributes) . '>';
        return $html;
    }
1056420
public function resolve($src){
		if( is_null($this->device_info->path_rewrite_rule) ){
			// パスの書き換えを行わない設定の場合、
			// この処理はスキップする。(無加工のまま返す)
			return $src;
		}

		$ext = $this->px->fs()->get_extension($this->path_original);

		switch( strtolower($ext) ){
			case 'html':
			case 'htm':
				$src = $this->path_resolve_in_html($src);
				break;
			case 'css':
				$src = $this->path_resolve_in_css($src);
				break;
		}

		return $src;
	}
1188970
public static function merge($src, array $new): array
    {
        if (!$src || !\is_array($src)) {
            return $new;
        }

        if (!$new) {
            return $src;
        }

        foreach ($new as $key => $value) {
            if (\is_int($key)) {
                if (isset($src[$key])) {
                    $src[] = $value;
                } else {
                    $src[$key] = $value;
                }
            } elseif (\array_key_exists($key, $src) && \is_array($value)) {
                $src[$key] = self::merge($src[$key], $new[$key]);
            } else {
                $src[$key] = $value;
            }
        }

        return $src;
    }
785932
public static function imageThumbnail($src, $alt = '', $htmlOptions = array())
    {
        $htmlOptions['type'] = self::IMAGE_TYPE_THUMBNAIL;
        return self::image($src, $alt, $htmlOptions);
    }
1151390
public static function unzipAssets($src, $dst) {

        if (false === is_dir($dst)) {
            throw new InvalidArgumentException(sprintf("\"%s\" is not a directory", $dst));
        }

        $result = [];

        foreach (static::listAssets($src) as $current) {

            $zip = new ZipArchive();

            if (true === $zip->open($current)) {
                $result[$current] = $zip->extractTo(realpath($dst));
                $zip->close();
            }
        }

        return $result;
    }