tags:

views:

129

answers:

0

I'm a novice in WPF and .NET programming, but I think I'm getting this right: Windows.Media.Imaging.GifBitmapDecoder has no capability to decode "partial" frames from Gif file. For example, I have a tiny GIF file of 2 frames: 1st frame is like a keyframe and 2nd frame includes only pixels that must be changed in 1st frame to get the needed picture. All image viewers and browsers dig those files right, but GifBitmapDecoder displays it "as is", without "blending" 2nd image with 1st. Allright, I'm not lazy, I could blend them myself (though I don't know how exactly, but it's a technicality...). But I need one more thing - a rectangle which covered by "second" frame. Because this frame is a lot smaller than 1st, base frame. And it's not positioned in the corner or the middle. GIF Animation specs say that every GIF frame has "Rectangle" of where it will be drawn over previous one. Could I at least find that info in GifBitmapDecoder or should I abandon this failure of human mind?

P.S. I need GifBitmapDecoder only to embed an animated System.Windows.Controls.Image into WPF's RichTextBox. I need this Image implementation because it's easily embeddable into an UIContainer.

Will be thankful for any answer.