Enabling PNG, JPG, and GIF in Emacs on Windows

Today I installed graphviz mode for Emacs. One of its features is that it will show you the rendered image in a buffer. When I tried it out, the image was opened as text. This is of course not what I wanted :).

The Emacs user guide says here that to enable support on Windows you should check “Other useful ports”.

This post was particularly helpful because it explained that the contents of the ‘image-library-alist’ variable tell us everything we need to know. When you view its contents, it tells you which DLLs that it is looking for in order to view each particular format of image file. Just get the Windows version of those DLLs and throw them in the Emacs bin directory and restart Emacs for image support to be enabled.

I got zlib1.dll, jpeg62.dll, and giflib4.dll from GetGnuWin32 and libpng14-14.dll from Gnome.


4 thoughts on “Enabling PNG, JPG, and GIF in Emacs on Windows”

  1. Tks a lot! I’ve been trying to enable this feature for a year now. Now my org-mode files are even more useful!

  2. Downloading now. I hope this works. I, too, and using this for Org-Mode. Need to keep a log with screen captures. I hope I can view the files directly from Org and not have to launch an external viewer.

Leave a Reply

Your email address will not be published. Required fields are marked *