ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Issue with GIF_DelayTime
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Mar 16 2024 :  11:22:25  Show Profile  Reply
Please look at this small project:

attach/PeterPanino/2024316111631_GIFDelayTest.zip
282.45 KB

Please follow exactly these steps to reproduce the issue:

1. Load the DelayTest_200.GIF. It automatically plays after loading: All frames have a GIF Delay of 200.

2. Click the STOP button.

3. Now, in the EditGIFDelay control, enter a value of 5 (instead of 200).

4. Click the "All Frames" button. This sets the GIF_DelayTime of all Frames to 5.

5. Now click the PLAY button: Now the GIF should play much faster, as the GIF_DelayTime of all frames has changed.

But it is playing at the same slow 200 speed as before!

Is this a bug in TImageEnMView?

PeterPanino

933 Posts

Posted - Mar 16 2024 :  16:10:06  Show Profile  Reply
I've found the solution:

The GIF_DelayTime value must be converted to an ImageDelayTime value to make it work at run-time.
It appears that the GIF_DelayTime is relevant only when saving to a GIF file.
Is that correct?

BTW, I would suggest to make this conversion automatic. I see no reason why it should not be automatic.
Go to Top of Page

xequte

38608 Posts

Posted - Mar 16 2024 :  23:55:45  Show Profile  Reply
Hi Peter

If playback is in TImageEnMView, then TImageEnMView.ImageDelayTime specifies the playback time (which defaults to GIF_DelayTime for GIF files).

To change the playback time when viewing you should set TImageEnMView.ImageDelayTime.
To change the playback time when saving you should set TIOParams.GIF_DelayTime (or TIOParams.ImageDelayTime).

- https://www.imageen.com/help/TImageEnMView.ImageDelayTime.html
- https://www.imageen.com/help/TIOParams.GIF_DelayTime.html
- https://www.imageen.com/help/TIOParams.ImageDelayTime.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: