如何从数据库中取出blob类型数据,并且转换为图片存到固定的路径
首先从数据库里面讲blob类型的数据取出来:
调用函数将二进制流准换为图片存储到本地
ok了调用上面的方法就可以实现将二进制流转换为图片了,当然因为数据库里面存储的是图片,你如果是存储的其他的格式的文件仅仅需要更改的是存储路径里面最后的格式就行了
希望对你有所帮助!!
如何从数据库中取出blob类型数据,并且转换为图片存到固定的路径
首先从数据库里面讲blob类型的数据取出来:
调用函数将二进制流准换为图片存储到本地
ok了调用上面的方法就可以实现将二进制流转换为图片了,当然因为数据库里面存储的是图片,你如果是存储的其他的格式的文件仅仅需要更改的是存储路径里面最后的格式就行了
希望对你有所帮助!!
二进制安装docker
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M