简体   繁体   中英

Delphi 7 GIF in picture Dialog

I am using Delphi 7 and the OpenPictureDialog to open / preview various images. This works fine when opening a bmp, jpg, etc.; however, if I try to do the same with a gif I get the following error. Anyone got any idea why or have a fix for it?

thanks

Colin

替代文字

Use this TGIFImage . This is the original unit which was donated to CodeGear in 2006. It supports Delphi7.

copy GifImage.pas to your project path (from gifimaged2010b.zip) , and add to your uses list ;

thats all

It will automatically add GIF in filters for openpicturedialog ( * *)

Just use the GraphicEx library by Mike Lischke. Just add a couple files to your uses list and your application natively supports GIF, TIFF, PNG and many many others. The standard TImage will work with them and also the TPictureDialog (along with all others standard components that use TGraphic - take note that some features will only work at runtime).

If you use our free syngdiplus unit, you'll get GIF, JPEG and TIFF image support at once, by using the gdiplus library, available on every Windows since Windows XP. It supports loading and saving pictures, and the preview in TPictureDialog. And your exe size with increase much less than with GraphicEx or TGifImage.

Works from Delphi 6 up to Delphi XE.

And you'll be able to draw any TCanvas with anti-aliaising.

See http://synopse.info/forum/viewforum.php?id=4

Delphi 7 simply doesn't support GIF images. This has led to a number of third-party components for reading GIF files. However, as of Delphi 2006 (IIRC), the RTL/VCL can read GIF files as well. Just include GifImg in the uses clause. (In fact, as of Delphi 2009, the RTL/VCL can also read PNG files. And then there is really no need for GIF support, because the PNG file format is superior in almost every way. The only thing supported by GIF that is not supported by PNG is (low-quality (1) ) animations.)

(1) GIF only supports 256 colours.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM