Delphi 7 GIF 图片对话框

发布于 2024-10-05 16:42:19 字数 212 浏览 6 评论 0原文

我正在使用 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

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

怎樣才叫好 2024-10-12 16:42:19

使用此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 (**)

妞丶爷亲个 2024-10-12 16:42:19

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).

梦幻之岛 2024-10-12 16:42:19

如果您使用我们的免费 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

白衬杉格子梦 2024-10-12 16:42:19

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文