public static function get($path, array $info = null)
    {
        $info = $info ?: self::getSize($path);

        switch ($info['mime']) {
            case self::TYPE_JPG:
                $srcImg = imagecreatefromjpeg($path);
                break;
            case self::TYPE_PNG:
                $srcImg = imagecreatefrompng($path);
                break;
            case self::TYPE_GIF:
                $srcImg = imagecreatefromgif($path);
                break;
            case self::TYPE_BMP:
                $srcImg = imagecreatefromwbmp($path);
                break;
            case self::TYPE_WEBP:
                $srcImg = imagecreatefromwebp($path);
                break;
            default:
                throw new FileInvalidTypeException('Not supported image type.');
        }

        return $srcImg;
    }