2013-03-17 140 views

回答

5

好的,终于可以弄明白了。显然,你需要将以下metdata添加到GIF得到它的循环:

BitmapPropertySet properties = await encoder.BitmapProperties.GetPropertiesAsync("/appext/Data"); 
properties = new BitmapPropertySet() 
{ 
    { 
     "/appext/Application", 
     new BitmapTypedValue(Iso8859.Default.GetBytes("NETSCAPE2.0"), Windows.Foundation.PropertyType.UInt8Array) 
    }, 
    { 
     "/appext/Data", 
     new BitmapTypedValue(new byte[] { 3, 1, 0, 0, 0 }, Windows.Foundation.PropertyType.UInt8Array) 
    }, 
}; 

await encoder.BitmapProperties.SetPropertiesAsync(properties); 

如果你没有在你的项目有ISO8859,只需将ASCII码为“NETSCAPE2.0”作为一个字节数组在那里。