Windows 下的 Emacs 和 PNG 文件 [英] Emacs under Windows and PNG files

查看:15
本文介绍了Windows 下的 Emacs 和 PNG 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道如何在 Win32 下的 Emacs 23 中显示 PNG 图像?我已经安装了 gnuwin32 实用程序集,包括 libpng 和 zlib;C:Program FilesGnuWin32in 在路径中.JPG 文件开始工作,但 PNG 不工作.如果您有任何提示,我将不胜感激.

Would anyone have any pointers on getting PNG images to display in Emacs 23 under Win32?.. I have installed the gnuwin32 set of utilities, including libpng and zlib; C:Program FilesGnuWin32in is in path. JPG files started working but not PNGs. I'd appreciate any hints on getting this to work.

PNG 缩略图实际上显示良好(例如通过 C-t C-t 显示).但是,打开它们会失败(在基本模式下作为垃圾打开,并且 M-x 图像模式显示图像规范无效").

PNG thumbnails actually display fine (e.g. in dired via C-t C-t). However, opening them fails (opens as garbage in fundamental mode, and M-x image-mode says "invalid image specification").

推荐答案

您必须复制以下 dll 之一 "libpng12d.dll" "libpng12.dll" "libpng.dll" "libpng13d.dll" "libpng13.dll"到您的 emacs-23.1/bin/目录.它们需要 zlib1.dll,您也必须复制它.我对 jpeg62.dll 和 giflib4.dll 做了同样的事情,现在我的 emacs 支持 jpg、gif 和 png 文件.出于某种原因,如果我只是将这些 dll 放在路径中,则它不起作用.

You have to copy one of these dlls "libpng12d.dll" "libpng12.dll" "libpng.dll" "libpng13d.dll" "libpng13.dll" to your emacs-23.1/bin/ directory. They require zlib1.dll which you have to copy as well. I did the same thing for jpeg62.dll and giflib4.dll and now my emacs supports jpg, gif and png files. For some reason it does not work if I simply put these dlls in the path.

您可以检查 (image-type-available-p 'png) 以查看是否支持 png.image-library-alist 将图像类型映射到支持它的 dll 列表.

You can check (image-type-available-p 'png) to see if png is supported. image-library-alist maps image type to a list of dlls which support it.

这篇关于Windows 下的 Emacs 和 PNG 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆