我需要在本地缓存图像,并考虑将它们保存为SerializableDictionary
SerializableDictionary来自:http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx
我想知道这是不是
a:处理图像缓存的好方法(对于离线模式 - 数据会不断更新,因此首先从网络中提取)。
b:我怎么能这样做?
我似乎只剩下以下xml:
<?xml version="1.0" encoding="us-ascii"?>
<dictionary>
<item>
<key>
<string>http://img.theguidestar.com/thumb/491520.png</string>
</key>
<value>
<UIImage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Handle />
<Size>
<Width>0</Width>
<Height>0</Height>
</Size>
</UIImage>
</value>
</item>
</dictionary>
我应该做些什么来使它自己序列化图像?
瓦特://
答案 0 :(得分:0)
UIImage和CGIMage不允许轻松访问其数据。因此,在XML文档中序列化图像非常困难。
您可以使用以下解决方案: