Delphi 7 GIF 图片对话框
我正在使用 Delphi 7 和 OpenPictureDialog 打开/预览各种图像。打开 bmp、jpg 等时效果很好;但是,如果我尝试对 gif 执行相同的操作,则会收到以下错误。有人知道为什么或有解决办法吗?
谢谢科林
< img
src="https://i.sstatic.net/p1JuU.jpg" alt="alt text">
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用此TGIFImage。这是2006年捐赠给CodeGear的原始设备。它支持Delphi7。
将 GifImage.pas 复制到您的项目路径(来自 gifimaged2010b.zip),
并添加到您的使用列表中;
这就是全部
它将自动在 openpicturedialog 的过滤器中添加 GIF (**)
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 (**)
只需使用 GraphicEx 库 迈克·利施克 (Mike Lischke)。只需将几个文件添加到您的使用列表中,您的应用程序本身就支持 GIF、TIFF、PNG 和许多其他格式。标准 TImage 将与它们以及 TPictureDialog 一起使用(以及使用 TGraphic 的所有其他标准组件 - 请注意,某些功能仅在运行时起作用)。
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).
如果您使用我们的免费 syngdiplus 单元,您将通过使用 gdiplus 库立即获得 GIF、JPEG 和 TIFF 图像支持,该库可在自 Windows XP 以来的所有 Windows 上使用。支持图片的加载和保存,以及在TPictureDialog中的预览。而且您的 exe 大小的增加远小于 GraphicEx 或 TGifImage。
适用于 Delphi 6 至 Delphi XE。
您将能够绘制任何带有抗锯齿功能的 TCanvas。
请参阅http://synopse.info/forum/viewforum.php?id=4
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 根本不支持 GIF 图像。这导致出现了许多用于读取 GIF 文件的第三方组件 。然而,从 Delphi 2006 (IIRC) 开始,RTL/VCL 也可以读取 GIF 文件。只需在 use 子句中包含
GifImg
即可。 (事实上,从Delphi 2009开始,RTL/VCL也可以读取PNG文件。然后真的不需要GIF支持,因为PNG文件格式几乎在各方面都优越。GIF唯一支持的是PNG 不支持的是(低质量(1))动画。)(1) GIF 仅支持 256 色。
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.