惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
Stack Overflow Blog
Stack Overflow Blog
月光博客
月光博客
T
Threat Research - Cisco Blogs
小众软件
小众软件
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tailwind CSS Blog
Cisco Talos Blog
Cisco Talos Blog
V
V2EX
博客园 - 【当耐特】
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
The Cloudflare Blog
The Last Watchdog
The Last Watchdog
Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
S
Secure Thoughts
O
OpenAI News
P
Proofpoint News Feed
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
Scott Helme
Scott Helme
T
Tenable Blog
A
Arctic Wolf
L
LINUX DO - 热门话题
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
Hacker News: Ask HN
Hacker News: Ask HN
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
博客园 - Franky
WordPress大学
WordPress大学
Know Your Adversary
Know Your Adversary
博客园_首页
雷峰网
雷峰网
IT之家
IT之家
PCI Perspectives
PCI Perspectives
L
LINUX DO - 最新话题
H
Heimdal Security Blog

博客园 - 梦书

Ubuntu 下修改文件和文件夹混合排序的时候-文件夹优先的规则 HarmonyOS应用开发者高级认证-2025年1月份 2024年年终总结 2024年上半年软件设计师第一批 2023年下半年网络工程师 获取Android设备的所有属性值 2022年架构设计师考试 2022年第2次居家办公 2021年系统分析师考试总结 Android开发手记之第一次运维 Ubuntu上降级chrome 2020年信息系统项目管理师案例计算题之我见 2020年信息系统项目管理师上午综合题41-75 2020年信息系统项目管理师上午综合题1-40 Android开发手记之Return code is: 401, ReasonPhrase: Unauthorized. Android开发手记之Could not find tools.jar Android开发手记之compileDebugAidl failed Android开发手记之android.content.res.Resources$NotFoundException: Resource ID #0x7f04005e Android开发手记之duplicate entry: res/drawable/a.xml
Android开发手记之图片base64
梦书 · 2021-01-27 · via 博客园 - 梦书

H5同事使用客户端提供的转化函数,无法将base64字符串转换为bitmap格式。

H5端用的是:

canvas.toDataURL('image/jpeg', 1) 

来获取base64。

客户端用的是:

Base64.decode(data, Base64.DEFAULT | Base64.NO_WRAP);

将H5端提供的base64字符串打印出来:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWsAAAJjCAY。。。。

开头部分就是多出来的头信息:data:image/png;base64,

需要将这些信息删除,即可转换成功。