Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, November 5, 2008 6:52:35 AM(UTC)

thymian  
thymian

Groups: Registered
Posts: 8


Hello LEADTools Support staff!

First of all, what I use:
LEADTools v16, VB.Net2008.

What is my problem (or what I desire to achieve):

1. I got a RasterImageList on a form.
2. Plus, I got an animated GIF with 12 pages.

I want to display animated gifs on this RasterImageList. And here's the problem: I don't want to display them as separate images, but as one animated image (all 12 pages of the RasterImage).


And that's my code:
---------------------------------------------------------------------------------------------
Declarations:

    Private rasterCodecs As RasterCodecs
    Private rasterImage As RasterImage

    Private rilImages as RasterImageList

    Private animationTimer As System.Windows.Forms.Timer
    Private animationPosition As Integer


Initialization:

        rasterCodecs = New RasterCodecs()
        rasterImage = rasterCodecs.Load("C:\loading.gif", 180, 180, 32, RasterSizeFlags.None, CodecsLoadByteOrder.Rgb, 1, 12)

        Me.animationTimer = New System.Windows.Forms.Timer()
        Me.animationTimer.Enabled = False
        Me.animationTimer.Interval = 250
        AddHandler Me.animationTimer.Tick, New System.EventHandler(AddressOf Me.AnimationTimer_Tick)
        Me.animationPosition = 2
        Me.animationTimer.Enabled = True


Timer Event:

    Private Sub AnimationTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs)

        If rilImages.Items.Count = 0 Then
            Return
        End If

        If animationPosition = 12 Then animationPosition = 1

        For Each item As RasterImageListItem In rilImages.Items
            If Not item.Image Is Nothing Then
                If item.Image.PageCount > 1 Then
                    item.Image.Page = animationPosition
                    rilImages.Refresh()
                    'System.Threading.Thread.Sleep(20)
                    'Application.DoEvents()
                End If
            End If
        Next

        animationPosition += 1

    End Sub

---------------------------------------------------------------------------------------------
Of course in another part of my code I fill the RasterImageList with RasterImageListItems.

How can I achieve to display the animated GIF? There's nothing happening, the items get displayed correctly with the 1st page of the rasterImage but there's no animation.

(I know e.g. the RasterImageBox supports animated gifs and even the typical PictureBox, but I want to achieve this with the RasterImageList).

Any help will be appreciated. Take care and keep up the good work ;)
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, November 5, 2008 11:21:15 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


What is the file version of Leadtools.dll that you are using?

Have you tried RasterImageList.Invalidate?

If that doesn't work, please send a small sample project (NOT your entire application) that isolates this problem so I can try to reproduce it here.

NOTE: If you are attaching a project or file to the forums...
1.) Zip the file(s) up.
2.) Make sure it is less than 5 MB.  If it is larger, please send an email to support@leadtools.com and we'll send you FTP instructions.
3.) Remove ANY AND ALL unlock codes and LEADTOOLS DLLs.
4.) Do not click the preview button, the attachment will not show up when you post it.

If you do not wish to post your file(s) on the forum since they are publically viewable, please send an email to support@leadtools.com and make sure that you include a link to this forum post.
 
#3 Posted : Wednesday, November 5, 2008 10:34:41 PM(UTC)

thymian  
thymian

Groups: Registered
Posts: 8


Greg, thank you very much for your immediate support.

Version of LEADTools DLL: 16.0.0.1

Yes of course, I got no problem posting a small project here in the forum. Here you go. Take a look at it and tell me if Im missing something.
File Attachment(s):
RILAnim.rar (59kb) downloaded 37 time(s).
 
#4 Posted : Thursday, November 6, 2008 4:56:25 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


The problem is with the RasterImageListItem.Image.Page property.  The documentation makes it sound like this should determine which page gets displayed in the RasterImageListItem.

I have reproduced this problem (which might just be a documentation error) and need to report it to our engineering department.  However, in order to do that I need you to send an email to support@leadtools.com including the following information:
 
1. The company you work for
2. The LEADTOOLS serial number(s) you own (if you are evaluating, just say so)
3. The name(s) of the developer(s) using the serial number
4. A link to this forum post

However, there is also the RasterImageListItem.Page property which will update which page actually gets displayed in the RasterImageListItem.  However, since the RasterImageList doesn't fully support animation, you are not going to get the results you'd expect because this image uses different size frames and offsets which is what we designed the RasterPictureBox for.  The only way you could work around this is to make each page in the image the exact same width and height so that it does not use offsets.
 
#5 Posted : Tuesday, November 25, 2008 9:32:58 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


The developers have let me know that this is by design.  They plan on adding more details to the documentation to make the difference between the RaterImageListItem.Page and RasterImageListItem.Image.Page properties more clear.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.136 seconds.