0
我想使用GifBitmapDecoder和Int32Animation播放gif圖像,但是我發現一些gif在播放時不完整。爲什麼GifBitmapDecoder播放不完整的gif
這裏是我的GIF:
這裏是我的測試代碼:
GifBitmapDecoder _gifDecoder = new GifBitmapDecoder(
new Uri("pack://application:,,,/Expression/f006.gif"),
BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
foreach (BitmapFrame bf in _gifDecoder.Frames)
{
Image i = new Image { Source = bf };
wp.Children.Add(i);
}
的XAML:
<WrapPanel Name="wp" ItemHeight="40" ItemWidth="40"/>
結果:
所以,你能告訴我什麼是錯的,因爲我有搜索它兩天,一無所獲......