教程 将 BASE64 和图片互转

简介: DataURI 允许在 HTML 文档中嵌入小文件,可以使用 img 标签或 CSS 嵌入转换后的 Base64 编码,减少 HTTP 请求,加快小图像的加载时间。 经过Base64 编码后的文件体积一般比源文件大 30% 左右。

DataURI 允许在 HTML 文档中嵌入小文件,可以使用 img 标签或 CSS 嵌入转换后的 Base64 编码,减少 HTTP 请求,加快小图像的加载时间。 经过Base64 编码后的文件体积一般比源文件大 30% 左右。


Base64编码要求把 3 个 8 位字节(3*8=24)转化为4个6位的字节(4*6=24),之后在 6 位的前面补两个0,形成8位一个字节的形式。 如果剩下的字符不足 3 个字节,则用 0 填充,输出字符使用 '=',因此编码后输出的文本末尾可能会出现1或2个'='。为了保证所输出的编码位可读字符, Base64 制定了一个编码表,以便进行统一转换。编码表的大小为 2^6 = 64,这也是 Base64 名称的由来。


该地址可以直接粘贴到浏览器地址栏中进行访问


data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABDCAIAAABbf2/QAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAEXRFWHRTb2Z0d2FyZQBTbmlwYXN0ZV0Xzt0AABlnSURBVGiBnXt5jF3Xed/vO+fc+96892bhcJkZ7qQoarMdiZIs1bIi1Y0kE60LJI1ToGhdO/SWpVBkoXbipDCK1olsBYls2KXQmJKTuHFq10FaC5asBZVkOU5ilaYkUxJFiqTI4TIkxVnfdu8939c/vnvPnHmUUrgXg8GbO2f51t+3nPMo+ch+770xxhgjIswsIvV6vd/vExER5XlurTXG6AciMiAiEhERASAiRITqYWZmJiKd5b333gPQufpfAxCRc05EiqLQwTqrKIokSZxzWZZ573UR8WytBVAUBQDnHADvve4biNEVjDFZVuiYoigcM+ugQKuyqtSHfym3gY1LBwRuARhj9KUKJUkS5UREjDHOOS4KJUsFquOZOU1T5SEspcOstd57/SAieZ6ryAIZyn+YpYJWXlxFjyoQxhhrXZ4XIgToGDLGEBlrwcwAsSwvVHHIA+JQ6plZrSNIBhCiZamr4ETEe680hYmBxKI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UQC9fY/N4ToD4yB611/3LU+QgkEQ6RmmABAmEUCMNZbMrx6QlVcTYlwKedNAZIvvjxNRv9cr41qUdjIze5+kqZEV38jSL0Mpvoc7gajuhQ6UckRkbt2W/bP+7t8++1REQ8g0QgtD8w0ARVEkxurKZSdK/0dVIznU17Flx5YcrDeIQNkyUeYVZgVaA3EhSZKoCJDopjwG4F0/c9mKjtdUK43NUIHHYpnn5Q5f8EOJLmpSVJVJdOVYqkzfew/mpFZTtuIyKsqYyywsnA1lWRYaFsEWlNY4vsX6rFz3bau8gPzivVSn7qz9UtVe2O/SmiBGrUvTg2BOWAlxy0pYeQ1ZdRWX7ZrW6mFDkPLyvs8drz9HQmSi7C8sFXdDVCI2SbT3USJN4FWqa9Mc3fJHlWoGMZuqpRcHkrKoj6o+fbIsS5LEGKgEgx9q91bXiY8M4j9jI9K7CG8p1jCXou9qSVSmLN8rXi6oIqSJrY4uEaFUnaiB00KKslmdPaDYgfOC5e97uhW3suONYp5jkAtTAnCol5nyqwj2/wLgPTcyFS7GjAAAAABJRU5ErkJggg==


也可将 Base64 在HTML中的使用

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABDCAIAAABbf2/QAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAEXRFWHRTb2Z0d2FyZQBTbmlwYXN0ZV0Xzt0AABlnSURBVGiBnXt5jF3Xed/vO+fc+96892bhcJkZ7qQoarMdiZIs1bIi1Y0kE60LJI1ToGhdO/SWpVBkoXbipDCK1olsBYls2KXQmJKTuHFq10FaC5asBZVkOU5ilaYkUxJFiqTI4TIkxVnfdu8939c/vnvPnHmUUrgXg8GbO2f51t+3nPMo+ch+770xxhgjIswsIvV6vd/vExER5XlurTXG6AciMiAiEhERASAiRITqYWZmJiKd5b333gPQufpfAxCRc05EiqLQwTqrKIokSZxzWZZ573UR8WytBVAUBQDnHADvve4biNEVjDFZVuiYoigcM+ugQKuyqtSHfym3gY1LBwRuARhj9KUKJUkS5UREjDHOOS4K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UFQNAUis0T2MNZotAMQ0f+d/Pnf4997Z+wgAPP3wi3cYKpQoQiGzdz60KttzXb4HQG/fo3PYJQDZxAEW1uHEzKFfvCH/GADgxRPpDy3c0p0PzWcfvb7/UQC9fY/N4ToD4yB611/3LU+QgkEQ6RmmABAmEUCMNZbMrx6QlVcTYlwKedNAZIvvjxNRv9cr41qUdjIze5+kqZEV38jSL0Mpvoc7gajuhQ6UckRkbt2W/bP+7t8++1REQ8g0QgtD8w0ARVEkxurKZSdK/0dVIznU17Flx5YcrDeIQNkyUeYVZgVaA3EhSZKoCJDopjwG4F0/c9mKjtdUK43NUIHHYpnn5Q5f8EOJLmpSVJVJdOVYqkzfew/mpFZTtuIyKsqYyywsnA1lWRYaFsEWlNY4vsX6rFz3bau8gPzivVSn7qz9UtVe2O/SmiBGrUvTg2BOWAlxy0pYeQ1ZdRWX7ZrW6mFDkPLyvs8drz9HQmSi7C8sFXdDVCI2SbT3USJN4FWqa9Mc3fJHlWoGMZuqpRcHkrKoj6o+fbIsS5LEGKgEgx9q91bXiY8M4j9jI9K7CG8p1jCXou9qSVSmLN8rXi6oIqSJrY4uEaFUnaiB00KKslmdPaDYgfOC5e97uhW3suONYp5jkAtTAnCol5nyqwj2/wLgPTcyFS7GjAAAAABJRU5ErkJggg==" />


在线转换工具


图片转BASE64 - 站长工具 - 极速数据 (jisuapi.com)


BASE64转图片 - 站长工具 - 极速数据 (jisuapi.com)


参考



BASE64编码/解码 - 站长工具 - 极速数据 (jisuapi.com)



目录
相关文章
|
开发者
处理base64图片数据的方式
处理base64图片数据的方式
132 4
livp图片怎么打开以及怎么转换成jpg格式教程
livp图片怎么打开以及怎么转换成jpg格式教程
|
JavaScript 前端开发 应用服务中间件
【前端项目笔记】原生js上传文件及文件转换成base64、blob类型
项目中经常会用到上传图片上传视频等功能,由于后端nginx限制,经常要进行文件转化才能上传,大文件可能还要进行切片上传处理。
677 1
|
2月前
|
前端开发
PDF文件上传转成base64编码并支持预览
PDF文件上传转成base64编码并支持预览
163 12
|
人工智能 Java 对象存储
Java获取阿里云图片临时URL与图片文件转换Base64编码方法
在使用阿里云人工智能产品服务时,有部分服务需要上传的参数中包含文件URL,当我们没有开通OSS服务时,可以使用临时URL服务、或部分服务支持Base64编码格式,此文章为生成临时URL-JavaSDK方案与图片文件转换Base64编码方案。
2040 0
|
4月前
|
Java
Java 图片、文件 Base64 互转
Java 图片、文件 Base64 互转
87 0
|
5月前
鸿蒙base64编码字符集转化成图片文件
鸿蒙base64编码字符集转化成图片文件
147 0
|
编解码 Java
Java原生图片Base64转码与Base64解码
Java原生图片Base64转码与Base64解码
|
Web App开发 前端开发
|
API 语音技术 Python
Python 技术篇-用base64库对音频、图片等文件进行base64编码和解码实例演示
Python 技术篇-用base64库对音频、图片等文件进行base64编码和解码实例演示
1010 0
Python 技术篇-用base64库对音频、图片等文件进行base64编码和解码实例演示