8

My first question here - this is new install of Delphi XE3. I thought animated GIF support was now built in to Delphi (since 2007?).

When I drop a TImage on my form, all is good until I populate the Picture field with an animated GIF file. As soon as I do that, the IDE adds the following to my uses clause

uses ... , Vcl.Imaging.GIFImg, GIFImage;

At that point, the IDE and compiler say it can't find GIFImage.dcu

[dcc32 Fatal Error] pco.pas(7): F1026 File not found: 'GIFImage.dcu'

I've searched my system and I don't find a GIFImage.dcu file anywhere. There are some TGIFImage files in some of the RAD Studio folders - like .bpl, .bpi, .dcp, .lib, and two .hpp files - one for both TGIFImage and GIFImage.

If I go do a download of the GIFImage stuff from Finn's site here http://www.tolderlund.eu/delphi/, and then put the GIFImage.pas file in my project, the situation resolves itself.

But according to this post How to use Animated Gif in a delphi form, GIFImage is now built in to Delphi, so I don't think I should have to do that ... So what am I missing here? TIA.

Community
  • 1
  • 1
jmroyalty
  • 2,527
  • 1
  • 15
  • 21
  • Surely this is an exact duplicate of a question I myself have asked about XE2... – Jerry Dodge Jan 07 '13 at 05:54
  • 1
    @Jerry don't be shy. Link to the question. – David Heffernan Jan 07 '13 at 07:40
  • http://stackoverflow.com/questions/8797138/design-time-package-fails-to-build-file-not-found-graphics-dcu Possible duplicate? – Jerry Dodge Jan 07 '13 at 13:21
  • @Jerry - that seems like a different issue to me. The only post that came up when I was researching is the one I quoted a link to. There was one other post that I didn't quote as it was closed as a possible duplicate of the one I did quote the link for. – jmroyalty Jan 07 '13 at 13:33
  • It's not the identical same unit which is not found, but it's the exact same reason. – Jerry Dodge Jan 07 '13 at 13:37
  • Actually, no, I take that back, it's partially the problem, but since `GIFImage.pas` has been replaced with `Vcl.Imaging.GIFImg.pas` it is a little different. – Jerry Dodge Jan 07 '13 at 16:22

1 Answers1

11

The name of the unit in XE3 is Vcl.Imaging.GIFImg. The TGIFImage class is defined in that unit.

There is no GIFImage unit in XE3. Simply remove all references to that unit.

I guess at some point the unit was renamed. Probably when it was taken on by Embarcadero and incorporated into Delphi.

If I go do a download of the GIFImage stuff from Finn's site here http://www.tolderlund.eu/delphi/, and then put the GIFImage.pas file in my project, the situation resolves itself.

Don't do this. Delete those files. If you go down that route you will have two versions of the same GIF code.

Andriy M
  • 71,352
  • 17
  • 87
  • 142
David Heffernan
  • 572,264
  • 40
  • 974
  • 1,389
  • thanks for the response. That's the way I assumed it should work, but it's not. If I remove the suspect TImage and delete the references to Vcl.Imaging.GIFImg and GIFImage - then save the file, all is good. As soon as I re-add the TImage and populate the Picture property, the IDE automatically re-adds both the Units to the uses clause. Let me try it in a new project and see if the issue persists. Now, I'm wondering if there is some configuration issue here. – jmroyalty Jan 06 '13 at 20:09
  • ok, I just closed everything, started a new project - dropped a TImage (only thing on the form) - set the Picture property to an animated GIF - almost the same result, it adds GIFImage to the uses clause, but it didn't add the Vcl.Imaging.GIFImg unit. – jmroyalty Jan 06 '13 at 20:13
  • 2
    You need to remove the package that you installed that has messed up your Delphi. A raw plain vanilla Delphi XE3 doesn't do that. – David Heffernan Jan 06 '13 at 20:20
  • ok, that's easy enough. I just installed this last week and have only been piddling with it, so I'll uninstall/reinstall. Thanks. – jmroyalty Jan 06 '13 at 20:28
  • just to clarify this issue. It must have been a corrupted install - I just uninstalled and then reinstalled XE3 and this now works as @Heffernan says it should. Thinking back, I'm pretty sure things got fubar'd when I tried to "install" the TGIFImage code as a component - so, don't do that. thanks again for the confirmation that it should work - and indeed it does. – jmroyalty Jan 07 '13 at 13:47