For the record, I'm using:
Windows XP SP3
Visual Studio .NET Pro 2008
LEADTOOLS Imaging Pro 16 v16.081218.100600
I'm trying to incorporate animated gif display when using the LeadTools.WinForms.RasterImageList object.
To do this, when loading the images, I check the Image.PageCount property, and then, where necessary, create an instance of the following class, which will manage the animation of that particular item:
#Region "Class: Animated Gif Class"
Private Class AnimatedGif
Private _itm As Leadtools.WinForms.RasterImageListItem
Private WithEvents _timer As Timer
Public Sub New(ByVal itm As Leadtools.WinForms.RasterImageListItem)
_itm = itm
_timer = New Timer
_timer.Interval = _itm.Image.AnimationDelay
_timer.Enabled = True
End Sub
Private Sub _timer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles _timer.Tick
If Not _itm Is Nothing Then
If Not _itm.Image Is Nothing Then
Dim i As Integer = _itm.Page
i = i + 1
If i > _itm.Image.PageCount Then i = 1
_itm.Page = i
_itm.Invalidate()
_timer.Interval = _itm.Image.AnimationDelay
Else
_timer.Enabled = False
End If
Else
_timer.Enabled = False
End If
End Sub
End Class
#End Region
This is working just fine, with the exception of certain animated gifs that seem to have incrementally built frames.
Right now, at the timer_tick event, the picture updates to show the next frame in sequence.
I don't know much about animated gifs, so I'm looking for a sample that would allow me to play gifs with composite frames - I'm guessing where frame 1 stays put and the other frames animate on top of it...?
I have attached a sample gif file, where the frames have a backdrop of red. Playing this file in a regular graphics program you never see the red.
Any help would be appreciated.
Thanks
MRTrevorF attached the following image(s):