将图像保存到xml文件 [英] Save image to xml file

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

问题描述

您好,我想知道是否有一种方法可以将图片框的内容保存到.xml文件中...然后使用openfiledialog打开它...您可以提供一些教程或其他内容吗?

谢谢

解决方案

您可以将图像(字节数组)转换为 ^ ],
然后将Base64字符串保存为XML.
需要时从 Base64解码 [ 解决方案

You can convert the image (byte array) to Base64 encoding[^],
and then save the Base64 string in XML.
When needed decode from Base64[^] string to image.


You can store a CDATA block in your XML, and serialise your image. Why do you need to do that ?


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

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