There is nothing wrong with your television set. Do not attempt to adjust the picture.
Note
I have donated TGIFImage to CodeGear and do not support it anymore.
TGIFImage is a full TGraphic implementation of the GIF graphics format.
It reads, writes and displays animated GIFs and can convert to and from TBitmap (i.e. the BMP format) and any other TGraphic derived format (e.g TJPEGImage, TIcon and TMetaFile).TGIFImage can either be used stand-alone or as part of Delphi’s extensible TImage/TPicture/TGraphic framework. When used in connection with the TImage component, TGIFImage registers itself with the TPicture class, giving you instant support for the GIF format throughout Delphi. After installing TGIFImage, you will be able to load, save and display GIFs without any additional code!
TGIFImage has full support for animated GIF and is the only solution that can display animated GIFs in the TImage component.
TGIFImage implements the complete GIF87a and GIF89a specification as well as all common GIF extensions:
Support for new Application Extension types can be added by the developer without modification to the TGIFImage source by registering the format at run-time with TGIFImage.
To demonstrate its use, TGIFImage comes with several sample applications: The “GIF Explorer” that can be used to view GIF files and examine their structure, a “simple” web-counter that demonstrates how to use TGIFImage with the Delphi CGI, ISAPI and NSAPI components together, an animated button component and an AVI to GIF and GIF to AVI converter just to mention a few of them.
Example 1
Converting a BMP file to a GIF file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 procedure ConvertBMP2GIF; var bmp: TBitmap; gif: TGIFImage; begin gif := TGifImage.Create; try bmp := TBitmap.Create; try bmp.LoadFromFile('MyBitmap.BMP'); gif.Assign(bmp); finally bmp.Free; end; gif.SaveToFile('MyBitmap.GIF'); finally gif.Free; end; end;
Many other freeware GIF libraries exists, so you might wonder why we need another one… The need for TGIFImage arose when I was writing a CGI application that needed to create large GIF images on-the-fly. After having tested a number of freeware libraries I concluded that they weren’t quite fit for the job with regard to performance and GIF compliance. Some of the DLL based implementations were OK, but Delphi integration were missing. So after reading through the GIF specifications and several articles on LZW compression, I decided that it couldn’t be to hard to whip something useful together.
The name TGIFImage might be a bit unfortunate as almost every known Delphi implementation of the GIF format is called TGIFImage, but it’s the most logical name for the gizmo and it shouldn’t be a problem once I have made the “competing” implementations obsolete
TGIFImage has been tested with several thousand GIF files, so I’m fairly confident that it will handle whatever you throw at it. If you find a valid GIF file that cannot be handled correctly by TGIFImage, please mail it to me with a description of the problem enter a QC report, and I’ll give you your money back
So what can TGIFImage do and how does it differentiate itself from some of the other implementations?
In February 2007 I donated TGIFImage to CodeGear with the purpose of adding in-the-box GIF support to the VCL, starting with Delphi 2007.
Besides giving me motivation to work on TGIFImage again, the transfer of ownership also gave me an opportunity to pull TGIFImage out the limbo it had been in and secure future development.
The official TGIFImage version 2.2 release is available from a lot of places on the net. However since the official release hasn’t been maintained since I distributed it in May 1999, I strongly suggest you use one of the following releases instead.
Finn has been maintaining TGIFImage on his own since my former web site disappeared. His version is based on the official TGIFImage version 2.2 release. For an updated TGIFImage version 2.2, supporting Delphi 5-2007, please go to Finn Tolderlund’s web site. In addition to the updated sources, I recommend you also get the original version 2.2 installation kit (also available from Finn’s site), since that contains the documentation and all the demos.
Since Delphi 2007 TGIFImage version 3.0 is included with all revisions of Delphi. Please note that this version does not support earlier versions of Delphi.
Version 3.0 was written by me and is a fork of version 2.3, a version that was never widely released. By fork I mean that it isn’t meant as a progressive continuation of the old TGIFImage. Backward compatibility was not a design requirement of the new TGIFImage, so I took the opportunity to remedy some of the things that I felt was wrong in the old version and some of these things could only be done without consideration for backward compatibility. Those that need backward compatibility should use Finn’s version.
Version 3 differs from version 2.2 in the following ways:
TGIFImage
class directly.TImage
to display GIFs, then you should be fine.TGIFSubImage
is now named TGIFFrame
.TGraphic
class (e.g. TBitmap
, TIcon
, etc). I judged that the average user wouldn’t want (or expect) animated content in TImage
as no other TGraphic
descendants support it. Please see the FAQ for a description of how to enable animation.TImage
rendering.Since CodeGear didn’t include any of the demos I wrote for version 3.0, you might want to grab a copy of the version 2.2 installation kit too. Although the demos won’t run with version 3.0 and most of the documentation is obsolete, it’s better than nothing. If time permits, I will try to post some of the demos that I have ported to version 3 here.
[Update: 03-apr-2008] The first of the demos is now available: Animation Demo for TGIFImage v3.
I do not provide unpaid support for TGIFImage anymore. Sorry!
For assistance with TGIFImage version 2.x, I suggest you seek help in the embarcadero.public.delphi.thirdpartytools.general newsgroup.
Bugs in Finn’s version of TGIFImage should be reported to Finn.
For assistance with TGIFImage version 3.x, I suggest you try the embarcadero.public.delphi.graphics newsgroup or open a support case with CodeGear.
Bugs should be reported in Quality Central.
TImage
component?
TGIFImage.Assign
method but the colors of the GIF are all wrong. Is this a bug?
BackgroundColor
property.
Timage
in Delphi it displays the GIF but does not animate.
ColorMap
and ActiveColorMap
properties?In Delphi 2007+ (i.e. TGIFImage version 3) the gifimage unit has been split into two units, GIFImg
and GIFConsts
, located in the RAD Studio/x.0/source/TGIFImage
folder.
This was done to avoid conflicts with older versions of TGIFImage, some which are still bundled with many 3rd party libraries.
You have probably forgotten to include the GIFImg
unit in your uses clause. Unless you add GIFImg
to one of the uses clauses in your application (doesn’t matter where), there is no way your application can know what to do with a GIF.
Try something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | var GIF: TGIFImage; Ext: TGIFGraphicControlExtension; begin GIF := TGIFImage.Create; try // Convert bitmap to GIF GIF.Assign(Bitmap); // Create an extension to set the transparency flag Ext := TGIFGraphicControlExtension.Create(GIF.Images[0]); Ext.Transparent := True; // Set transparent color to lower left pixel color Ext.TransparentColorIndex := GIF.Images[0].Pixels[0, GIF.Height-1]; // Do something with the GIF here... ... finally GIF.Free; end; end; |
You should also check out the Animate demo application for an example of this.
Yes of course there is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | var GIF: TGIFImage; begin GIF := TGIFImage.Create; try // Make bitmap transparent Bitmap.Transparent := True; // Convert bitmap to GIF GIF.Assign(Bitmap); // Do something with the GIF here... ... finally GIF.Free; end; end; |
The lesson here is that TGIFImage will automatically convert a transparent bitmap (TBitmap.Transparent = True
) to a transparent GIF.
PhotoShop, the Java GIF library and some older DOS applications (e.g. VPIC) is unable to handle local color maps (common in animated GIFs) and only support GIFs with global color maps.
To work around this problem, you can use the TGIFImage.OptimizeColorMap
method to convert all local color maps to a single global color map.
Generally, if there is a difference between how a GIF looks in a browser and some other application, the browser has it right. TGIFImage has been designed to display GIFs like most browsers do.
You need to add a “Netscape Loop” extension block to the first frame of your GIF.
The loop block must be the first extension you define for the frame or else it will not work.
See the Animate demo for an example of how to build an animated GIF.
You probably have another GIF library installed.
The error is often caused by one GIF library attempting to load an image stored in a form (or some other stream) by another, incompatible, GIF library. The RxLib (now part of Jedi) GIF library is known to store GIF data in a format that is incompatible with most other GIF libraries.
TImage
component?The only thing you need to do, is to add the GIFImg
unit to a uses clause anywhere in your project:
Uses GIFImg, Windows, Messages, SysUtils, Classes... etc.
When you do this, TGIFImage will automagically register itself with the TPicture
class in the initialization section of the GIFImg
unit.
TPicture
is the class that TImage
uses to support different graphic formats.
TGIFImage isn’t a component and as such won’t show up on the component palette. Only classes that are derived from TComponent
are real components. I often refer to TGIFImage as a component, but this is only because it’s easier for people to understand.
TGIFImage
is just like TBitmap
, TStringList
, TIniFile
etc; You use it in your code, not on a form.
If you need to display a GIF on a form, just use the TImage
component, but remember to reference the GIFImg unit or the TGIFImage library won’t be linked into your application.
TGIFImage.Assign
method but the colors of the GIF are all wrong. Is this a bug?No, probably not.
More likely the problem is that your bitmap is in a format that can potentially contain much more than 256 colors.
In order to be able to import bitmaps with more than 256 colors, TGIFimage first reduces the potential number of colors to a maximum of 256, and then converts the bitmap to 8 bit format. This is necessary because the GIF format doesn’t allow more than 256 colors.
You can control the method TGIFImage uses to choose the colors that are used in the final GIF, by setting the GIFImageDefaultColorReduction
variable.
The default color reduction mode is rmNetscape
(fixed 216 color “web-safe” palette) because it is extremely fast. This means that even if your bitmap contains 256 colors or less, it will be reduced to the 216 color Netscape palette. To avoid this, you must use one of the more intelligent color reduction methods (such as rmQuantize
).
The following code snippet changes the transparency color of all frames to white:
for i := 0 to GIF.Images.Count-1 do with GIF.Images[i] do if (Transparent) then ActiveColorMap[GraphicControlExtension.TransparentColorIndex] := clWhite;
BackgroundColor
property.This happens when the GIF already contains 256 colors and the color your are specifying isn’t one of these.
Internally a GIF stores the background color as an index into the color map (the BackgroundColorIndex
property). If the new background color already exists in the color map, TGIFImage just uses that color, otherwise TGIFImage must add it to the color map. If the color map is already full you get the above error.
Yes and no…
A single GIF frame can only contain up to 256 colors, so for a non-animated GIF the answer is Yes. However, since there’s no limit on the number of frames you can have in a GIF, the more correct answer is actually No; It is possible to construct GIF images with any number of colors.
When I get a spare moment (yeah right), I’ll see if I can make a small program that demonstrates the different methods of creating true color GIFs.
Timage
in Delphi it displays the GIF but does not animate.As you’ve discovered I chose to disable animation by default. The primary cause was that I judged that the average user wouldn’t want (or expect) animated content in TImage
as no other TGraphic
descendants support it.
Anyhow, to enable GIF animation globally just set the GIFImageDefaultAnimate
global variable to True:
GIFImageDefaultAnimate := True;
and then load the GIF into your TImage
as usual.
You can do the same for transparency with the GIFImageDefaultTransparent
global variable:
GIFImageDefaultTransparent := True;
If your GIF is both transparent and animated you should double buffer the parent of the TImage
control to avoid flickering. E.g. by placing the TImage
on a TPanel
and setting the panel’s DoubleBuffered
property to True.
ColorMap
and ActiveColorMap
properties?A color map is the GIF terminology for a palette.
A GIF frame can either use a local or a global color map. A local color map only exists for the frame that defines it while the global color map is shared among all frames.
The ColorMap
property contains the local color map.
The ActiveColorMap
property points to the color map that the frame actually uses.
If the local color map is empty and the global color map is not empty, then ActiveColorMap
will point to the global color map. Otherwise ActiveColorMap
points to the local color map.
Thank you in advance. Here is the problem:
i was managed to draw a gif on the
TRzStringGrid
(which is a third components) cells, callCanvas.Draw(x,y,Bitmap)
method to draw transparent gif files (files with ‘.gif’), although i use photoshop to make a picture with transparent background and saved as xx.gif, i still get a image white background on the cell, why?Could you show me an example?
What color did you expect the background to be?
How do you load the GIF? If you load it into a
TImage
, have you setTImage.Transparent=True
?Are you sure the GIF is transparent? Does it display transparently in other applications? Do other (known) transparent GIFs work?
The following works for me:
TImage
and aTRzStringGrid
on a form.TImage
.Transparent=True
andAutoSize=True
.OnDrawCell
event handler:You are TGifImage Author ?
This is very COOL. Thank you very much
Congratulation for your Tgifimage component! i use them from 2001 and it's a very great component !
It is really great to see your site up and running again. It looks somewhat different to your original site
I've been using your GIFImage for years (since Delphi 4/5) in a free Avatar resizer I give away.
Thank you very much.
John
Thanks for this unit, anyway, I have a problem.
I intend to use TGIFImage for displaying progress bar (sort of) during query execution. Now, since that query uses 100% of cpu, gif animation locks…
Is there a way to resolve this?
Thank you,
Miha
I don't have an easy solution for you. I can only recommend that you execute the query in a separate thread.
The reason the GIF animation (and every thing else for that matter) doesn't update while your query is running, is that the main thread isn't processing any windows messages.
TGIFImage used to be able to paint even though the main thread was blocked, but after the I redesigned the GIF renderer that isn't possible anymore. Even the TAnimation control doesn't paint asynchronously anymore - it just isn't safe.
Miha if you don't mind …, I would suggest you would execute your query in a separate thread. The animation will not freeze then.
i have problem to get palette of GIF image. how to get it and to store this palette to the array.
thx
Thank you both. But my knowledge of programming is a bit too basic for threading. My colleague found some solution though.
Thank you very much for this Unit, I only have one problem: the animate do not work (I have insered the GIFImageDefaultAnimate to True but nothing change!
Please can you help me?
Best regards.
Thank you very much. I use TGifImage since 1999.Bear
Excellent work. been using your TGifImage for a while now, with no probs.
Now what would be really cool is to show an animation while processing something, and have it still animate smoothly. like have it in a thread. Any ideas how that can be done?
cheers!
That's easy… The "old" version 2.2 TGIFImage uses a threaded renderer. One of the examples (the Thread demo, if memory serves) demonstrates how to use the renderer directly, without TImage. The threaded renderer can also be used with TImage, but one has to take care to stop the renderer before the TImage is destroyed - or else… kaboom!
The new version 3 TGIFImage renderer uses timers instead but the framework was designed so one can replace the renderer with a custom one.
Hi. Good work on the gif unit, I have been using it for a while. I recently upgraded delphi and took out the old gifimage unit and used the one packaged with delphi. Most of the stuff works fine. however I do instantiate tgifimage directly and a lot of the pictures are coming out in very different colours compared to how they used to. Could you publish what changes need to be made when using the 3.0 version as opposed to the 2.2 version? Thanks. Cedd
How to download?
See:
http://melander.dk/delphi/gifimage#download
Hi,
nice work. 1 animated gif is ok, but how can i have 5 animated gif on the panel?
1.gif, 2.gif, 3.gif … etc …
Thx
Hello,
I am wondering if you know, by animating a simple GIF with a tImage component, how can I obtain the frame number at which it is currently at? (So I could for example know when a GIF animation has completed it's cycle on a splash screen to remove it and display the actual program to the user).
Kind regards,
Christopher
Hi
I am using TGIFImage to export subimages to bitmap.
but the first bitmap is ok,and the next bitmap is fail.
Too bad. So sad.
This problem has been solved..
thank..
you example is very nice!!!
Nice work Anders.
I've been using TGifImage since C++Builder 5 I came to your site with 2 questions:
Should it work? Do I have to apply the change somehow?
I see in the FAQ above that you use
ActiveColorMap
. That's a nice trick that changes the palette to match the GCE instead of the other way around. But what's the difference betweenActiveColorMap
andColorMap
?Thx for your time.
Note though that the GIF's rendering of the frame (i.e. the frame bitmap) is cached so any changes you make to the frame, after it has been rendered, might not update the bitmap.
The
Dormant
method can be used to clear/invalidate the frame cache.WRT
ColorMap
/ActiveColorMap
see the FAQ.Hi Anders Melander,
Thanks for sharing this great unit. I had sent a previous email with the problem I am having when trying to load animated GIF from an access database using BlobField and TAdobstream. I dont know why the post has not been published? Could it have got autamatically dropped because of length? I had pasted my code in it.
Kind Regards
Anu
Yes it probably got eaten by the spam filter. Don't know why.
Please describe the problem before posting code.
I have created some GIF animations using a third party software. These look ok when viewed inside browser. However when I load the gif images to TImage using LoadFromFile method, some of the GIF images fail to load all the frames. I tried to replace the faulty GIF with new ones created from the same BMP files. Still although the GIF animations look ok in browser, some frames fail to load. This is totally mind boggling. I find no logical answers. Can some one help me sort this out? This is a real challenge. I would appreciate very much your help/suggestions/info on this.
Thanks & Regards
Anu
Send me an email with the problematic GIF and I'll take a look at it.
I've examined your GIF in the GIF Explorer demo application and I cannot spot any problems with it. I've successfully loaded the GIF into a TImage component and it animates through all eight frames and loops. No problems.
What exactly is the problem you're seeing?
Do you see more than one frame? Which frames?
Which version of Delphi are you using?
Which version of TGIFImage?
P.S. Don't call TPicture.CleanupInstance; It's for internal use by the VCL.
It is Delphi 7 on Windows XP SP3 and TGifImage is 2009.10.14. The GIF image loads with the first 3 frames. Always the frames subsequent to these get dropped.
Thanks again for investigating this problem.
Regards
Anu
That version of TGIFImage is maintained by Finn Tolderlund (you know, the place where you downloaded it from), so you really should address issues with it to him. The new version 3 does not exhibit the problem.
That said, I've found the cause of the problem: Your GIF is invalid.
I can see in the comment embedded in it that it was made with Theodor Kleynhans' GIF library (apparently abandonware), so maybe you should have a chat with him too
The problem can be worked around with a change in TGIFImage, but since I no longer maintain version 2.x you should ask Finn to do it.
To save Finn the trouble of finding the cause of the problem and the solution to it, you can tell him that in version 3.0 the problem occurs in
TGIFFrame.Decompress
and the work around is the calls toBitStream.SkipData
. If i were him I'd just copy the whole LZW decoder.Hi Anders Melander,
We are using Delphi 2007 with Version 3.0.7 of the GifImg unit.
We have patched the assign method to prevent the duplication of frames as advised on http://qc.embarcadero.com/wc/qcmain.aspx?d=42385
however we still have an issue at design time.
We load a Gif Image into a TImage comonent on a form at design time.
If we then Open the picture editor (properties for the Timage) and try and save the gif back to file, the frames are duplicated, resulting in a file with multiple copies of the frames.
Any advice would be appreciated. Thanks.
The problem is that even though you have patched the
GifImg
unit, the Delphi IDE is still using a design time package containing the unpatched version. The package is "CodeGear Delphi image support library" in%system32%\vclimg100.bpl
Unfortunately the standard design time package cannot be uninstalled/removed because a lot of other packages have (unnecessary) dependencies on it.
Instead you need to create a new design time package containing your patched
GifImg
unit and have this package override theTGIFImage
image format registration. Fortunately it's very easy:GifImg.pas
and save it with a different name. E.g.GifImgFixed.pas
.GifImgFixed
unit (i.e. the renamed one) and add it to the package.Hi,
I've been using your unit for quite a while. Just dropped a line to thank you.
thank you
Hello!
I have some problem code:
I have several bmp files (frame with my textout) but animated giffileout.gif without my text out what is wrong?
The frame bitmap is not meant to be modified.
To modify a GIF frame you should copy the frame to a bitmap, modify the bitmap and then copy the bitmap back to the frame:
Thanks.
But still not work. Or an error or animated picture is distorted.
That's too bad.
The export/import via
Assign()
works, so I think the problem is that the frame you are modifying is transparent. Due to the way GIFs specify transparency you have to take such things as color tables, color index values and Graphic Control Extensions into consideration. I suggest you read up on the GIF specification.Dear Anders Melander!
I created a small application, with Delphi 2009 and GIFImg.pas unit from VCL. The software extract frames from animated GIF, and repack to a new GIF file.
Problem is that many cases some frames will be lost. If I open created GIF with explorer or Irfanview, show ex. just first 16 frames from 25. But if I open with my application, end extract frames, all 25 frames is there and is ok.
What is your opinion about this?
Thank you!
P.S. Sorry for my english
Dear Anders,
Another happy user of your component here. I'm using it in Delphi 2010 to show an animation of a ship in waves. One loop contains about 50 or 60 bitmaps. After saving the animation to a gif file the loop is only shown once in my internet browser whereas I want it to repeat. Could you please indicate whether that's possible and if so which properties I'd have to set?
Thanks!
Tino.
You need to add a Netscape loop gizmo to the first frame. It's very easy:
P.S. It’s in the FAQ…
Thanks Anders, that really helped!
P.S. I did look at the FAQ, but apparently I've missed it . Sorry….
Hi Anders,
I'm using the GifImg included in Delphi 2010, to display an animated GIF. Is possible to know when the animation reach the end? How to reference the renderer?
Thank you.
p.s. Sorry for my english.
hay Anders Melander,
i want to draw a animated and transparent gif near to the cursor.
i tried it with the MouseMove event but they wont to be animated.
GIF.LoadFromFile( 'C:\Test.gif' );
GIF.Transparent := true;
GIF.Animate := true;
frmGif.imgPopup.Picture.Assign( GIF );
// frmGif.imgPopup :TImage
ListView1.Canvas.Draw( x+10, y+10, frmGif.imgPopup.Picture.Graphic );
any idea?
I have component Version:2.2
and i have delphi 7!!
My problem is with ocx activex
Can some one help please???
Hello, Anders Melander.
Thanks for this unit, BUT:
Please update your Q&A about animated GIF.
To make such animation working within Delphi 2010 !!!, Users must use this code because there is no default Unit as TGIFImage !!!
Cheers.
As far as I can tell the information in the FAQ is accurate: You can enable animation by default through the
GIFImageDefaultAnimate
variable. Just remember to set the value before theTGIFImage
object is instantiated.It is correct that you can control animation on a specific
TGIFImage
instance with theAnimate
property, but that wasn't the topic of the FAQ entry.Well, then there is something wrong with your global variable as it did not do the trick for me. That's why I wrote this comment …
man, you should really fix your weirdpress, useful text is in thin (~1/3 of screen width) and really tall column
Yeah it sucks. I know.
Unfortunately I have made so many modifications to my wordpress, the theme and the plug-ins that I cannot easily upgrade or change the theme.
I'm waiting for bbPress to mature. Once that happens I will change to a fluid theme and move all comments to bbPress.
I cannot post a 150 words comment. It just says “Your comment has been added” but the comment is not posted.
[edit] It worked to post a small comment then edit it and add the rest of the text.
Your comment (all three of them) was added but for some reason they ended up in the spam queue. Sorry about that. I have been trying to fix this problem for years - obviously without luck.
P.S. My space bar keep getting stuck. Last night I spilled a whole G&T into the keyboard
If you remove the electronic board from inside your keyboard, you can wash your keyboard (the plastic part). I have done it before. After it dries out you can put the board back.
Screw the keyboard! How do I get my G&T back?
No seriously, it was an old IBM keyboard in need of replacement anyway. I have a whole box of those old IBM keyboards in the garage. They are a bit noisy but I like the tactile feedback.
Hi Anders.
I have a custom visual control which contains a
TImage
and a label. I use it to animate (single loop) a GIF image every time I show a message to the user to attract its attention. The messages appear every few seconds but sometimes they appear quickly. This makes the GIF to start loop several times in a millisecond. I have reasons to believe that this is screwing my application. So, I have tried to stop the animation before giving a new ‘animate’ command like this:Still I have some nasty errors at random intervals.
Few minutes ago I have tried to do this:
I will wait to see if the errors still appear.
Do you have any other hints for me about how to safely animate an image?
I'll look into it but I would recommend that you use a small AVI and the TAnimate component for animations instead.
IMO animated GIFs should only be used in web pages.
This is the log of the error:
The log shows that the error appears when I call
StartAnimation
function (listed in the previous post (55)).Another hint: if I don’t use the animated image, the program works!
That stack trace definitely points to TGIFImage. I think I will be able to pinpoint the cause from that. Thanks
One more question: what is the appropriate way to stop the animation (and with it any threads)?
Call the
TGIFImage.StopDraw
method or set theTGIFImage.Animate
property toFalse
.Damn.
I was hoping to be another way because I was already doing this (see above post) and it is not working:
Ok. In this case, the question is: how much time needs the painter thread to die?
As explained above, I believe that even if I call
StopDraw
, the second animation round starts before the first one has a chance to stop. There is a way to know if the animation is actually stopped? If it isn’t then I just don’t start the second animation round.There are no threads involved (notice how all the threads from your stack trace have the same ID).
The old version of TGIFImage used a thread, but the new uses a timer.
If you step into the call to
StopDraw
(orAnimate := False
) you will see that the call doesn't return until the timer has been stopped, the GIF renderer has been destroyed and the reference to it has been nilled.I'm afraid I couldn't spot any problems with the help of your stack trace.
If you could create a short (10-20 lines of code) application that reproduces the problem, and mail it to me, I should be able to identify the cause of the problem.
I will do that.
I can reproduce the error in my program almost on demand.
A bit off topic, but how did you get that stack trace? I'm using C++Builder 6 and there is no such functionality to my knowledge. It would be extremely useful.Thx
@Stephan
I use Eureka Log - it is a great tool! It really saves time! Once you use it, you will wonder how was your life possible without it.
HELP!!!!
How to know when the GIF broadcast finished?
this is my code:
it was very cool code
thx to all
I have a problem but I dont know if it is with Gif component or not.
I am loading a GIF file, then splitting and converting the individual frames of the GIF to BMP and adding to a
TImageList
(to allow editing the individual frames). The problem seems to be if the original GIF has "empty" frames they do not get added toTImageList
- Also noticed if splitting the GIF and saving the frames to a folder, it will not save empty frames.How to split all the frames of the GIF successfully? even with empty images in the GIF? Thanks!
Hi ! I want to make a GIF compression used the VLBE (variable length binary encoding) algorithm. I would like to use both 87a and 89a GIF image. are there any way to do that..? I very confused. I have search through the web but I don't find the way. I have tried your GIF image component but I still confused to do that. Can anyone help me…? Thanks.
Hi.
I think that I need a .hpp file to use TGifImage on C++Builder 5.
I've downloaded all files from the download session related to the TGifImage and I did'nt find it.
Could you help me?
Thanks.