How to display a GIF file in a TImage? lazarus / 7-LCL ---------------------------------------------------------------------- tech-pro · 2008-11-27 23:47 What's the best way to display a GIF file in a Lazarus program? I had a program that used OPBitmap that displayed GIF images. But the version of OPBitmap I had did not compile with 0.9.26. I downloaded the latest version of OPBitmap and compiled that, but now GIF files are treated as an unknown format. What to do? I'm not sure if OPBitmap is the best thing to use anyway. Is it cross- platform? I have only ever used it under Windows but I want this program to work under Linux as well. ---------------------------------------------------------------------- Leledumbo · 2008-11-28 03:13 There are some components (try latest version, if it doesn't work, try downgrading) named TGIFImage here, I've checked the source and it seems possible to compile under Lazarus with a little modification. Like deleting CompareMem and replacing ReturnAddr with ExceptAddr as FreePascal already implements them in a cross-platform nature. ---------------------------------------------------------------------- tech-pro · 2008-11-28 10:41 Thanks. It won't be necessary as I found a new example that loads a GIF into a TImage via a TLazOPPicture which solved the problem. However I'd still be interested to know why loading it directly into the TImage after simply adding fpimage and opbitmapformats to the Uses clause no longer works, as it originally did in the lclintegration demo example. I just verified that OPBitmap works in Linux too. Lazarus is brilliant!! ---------------------------------------------------------------------- theo · 2008-11-28 11:00 Humm, the lclintegrationdemo works for me. Make sure that the unit "RegisterLazOp" is in the uses clause somewhere. OpBitmap works on Linux and Windows (32bit). It basically works on 64 bit except the readers ported from GraphicEx which contain tons of Intel ASM. GIF R/W for example should work on 64 bit. I have never tested it on a Mac.