[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Svg mode

From: Eli Zaretskii
Subject: Re: Svg mode
Date: Fri, 15 Oct 2010 17:20:39 +0200

> From: Oleksandr Gavenko <>
> Date: Fri, 15 Oct 2010 17:21:47 +0300
> MS Windows:
>    $ strings emacs.exe | grep png
> libpng12d.dll
> libpng12.dll
> libpng.dll
> libpng13d.dll
> libpng13.dll

This doesn't do what you think it does.  In general, the mere fact
that libpng is seen in some string within a binary does not mean the
binary supports display of PNG images.  For example, it could come
from a message string like "Sorry, libpng12.dll is not supported."

What you see is that Emacs knows _something_ about PNG libraries.
That something comes from image-library-alist (dynamic-library-alist,
if you are using the development sources of Emacs 24).  This alist
simply says that to support PNG, Emacs needs to load one of these
dynamic libraries.

> But 'depends.exe' show that 'libpng12.dll' come from third party:
>    c:\opt\graphviz2.26.3\bin\LIBPNG12.DLL

Emacs loads these DLLs dynamically and on demand, so `depends.exe'
will not necessarily see any dependencies, because technically Emacs
does not "depend" on them -- it can run without them.

> Emacs from is come only with 'libXpm.dll'.

Yes, because of copyright considerations, and because without XPM
support Emacs cannot show its toolbar icons in color.

> With 'grep svg' on Windows:
>    $ strings emacs.exe | grep svg
> librsvg-2-2.dll

See above: this doesn't mean what you think it does.

> I download 'librsvg-2-2.dll' from
> and put it to PATH. Emacs on open .svg say:
> byte-code: Cannot display image: (Invalid image type `svg')
> image-type: Cannot determine image type

Exactly!  The Emacs binary you have was not compiled with SVG support,
so it does not recognize the SVG format.  The SVG DLL is loaded only
if Emacs recognizes this format, whose support is optional (and
doesn't work very well on Windows, because the SVG support DLL is not
stable enough, AFAIK).

> So try search svg string in emacs executable and install appropriate lib.

That's not guaranteed to solve the problem, as I explain above.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]