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
 Animated GIF
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bmesser

United Kingdom
224 Posts

Posted - Sep 26 2012 :  11:33:09  Show Profile  Reply
Hi

A couple of questions regarding animated GIFs. I have some code (from a Anders Melander demo) to create an animated GIF. I used it to stitch a series of weather maps together for my web site. Although the code did make reference to optimisation the total size of the GIF was almost the sum of all the images that made it up. I may be a bit naive in thinking that optimising would have found a lot of commonality in the images (due to the common map background) and the final product would have been a good deal smaller?

I have seen mention of animated GIFs in the ImageEn documentation but so is there a demo app that shows how to construct one frame by frame?

I know I can display an animated GIF using a TImage component - it surely must be possible to do the same thing in an ImageEN component - I've seen that there is a demo that does separate all the individual frames and I have loaded an animated GIF into a TImageEnView component - but how do you start animating it?

Bruce.

xequte

38613 Posts

Posted - Sep 26 2012 :  16:02:16  Show Profile  Reply
Hi

You need to use a TImageEnMView for display of an animated GIF (Load it and then set Playing to true).

Use the Multiview demo in your ImageEn folder at:

Demos/Multi/Multiview/Multi.dpr



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

bmesser

United Kingdom
224 Posts

Posted - Sep 27 2012 :  05:03:16  Show Profile  Reply
Hi Nigel

Thanks for the reply - yes I should have remembered - playing!

All I really wanted to do was overlay (for a short time) a 'loader' animated GIF on top of an image that I was downloading by means of a URL (see the http://www.ajaxload.info site for examples). Ideally this should be transparent - this is possible using a TImage component but I can't get the TImageEnMView to do this. I should have added a "built in loaded" option to your recent ImageEN survey! My efforts so far look rather pathetic and I will be heading back to using a progress bar by the looks of things!

That aside, I was also asking if the ImageEN components could help me dynamically build (as well as display) an animated GIF with optimisation from scratch (large weather maps for example), or should I stick with the code that I mentioned Anders Melander has made available on his site?

Bruce.
Go to Top of Page

gsimpson

USA
2 Posts

Posted - Sep 29 2012 :  13:59:40  Show Profile  Reply
I too have a GIF animation question. I have used InsertToFileGIF to create a gif file that will be transmitted in a web page if the associated device is running to show animation on the web page. The image only plays one time and does not repeat. How do you make the object repeat playing?

James Simpson
Go to Top of Page

w2m

USA
1990 Posts

Posted - Sep 29 2012 :  17:28:02  Show Profile  Reply
James:

I assume you are using ImageEnMView to "play" the gif with "playing".

property PlayLoop: boolean;
Description
Set PlayLoop to True to continuously loop playing.


William Miller
Go to Top of Page

xequte

38613 Posts

Posted - Sep 30 2012 :  00:29:23  Show Profile  Reply
Hi Bruce

It is relatively simple to use a TTimer to animate a GIF image in a TImageEnView by loading each frame on demand (in fact, we are thinking of adding a playing property to TImageEnView).

The main properties you need to access are:

GIF_DelayTime
GIF_XPos
GIF_YPos

Of course, this assumes that the GIF is not so large that each frame can be loaded quick enough to display it, otherwise you should preload all the frames, e.g. into a TIEImageList

I'm afraid there is no functionality within ImageEn to optimize the repeated data in an animated GIF.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

gsimpson

USA
2 Posts

Posted - Sep 30 2012 :  06:09:52  Show Profile  Reply
I am not using a component to play the gif file. It is being presented in a web page to play in Explorer.

James Simpson
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: