2013-03-17 136 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」作爲一個字節數組在那裏。