如何将base64保存到文件夹中的图像? [英] How do I save base64 to image in folder?

查看:78
本文介绍了如何将base64保存到文件夹中的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将base64转换为图像并将其保存为jpg?$('#image')。attr(src,data:image / png; base64,+ $ .scriptcam.getFrameAsBase64() );

我真的需要你的帮助!请帮助

解决方案

('#image')。attr(src,data:image / png; base64,+


.scriptcam.getFrameAsBase64());

我真的需要你的帮助!请帮助


1。从base64字符串中删除部分

data:image / png; base64。

2.调用base64_decode

string base64_decode(串

How can I convert the the base64 to image and saving it as jpg?$('#image').attr("src", "data:image/png;base64," + $.scriptcam.getFrameAsBase64());
I really need your help! please help

解决方案

('#image').attr("src", "data:image/png;base64," +


.scriptcam.getFrameAsBase64());
I really need your help! please help


1. Remove the part
"data:image/png;base64," from your base64 string.
2. call the base64_decode
string base64_decode ( string


这篇关于如何将base64保存到文件夹中的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆