Subject: Re: bug#6837: Cannot view PNG images

From: Andy Moreton <[email-masked]>
Date: Fri, 13 Aug 2010 10:12:17 +0100

On Wed 11 Aug 2010, Jason Rumney wrote:

> On 11/08/2010 05:46, [email-masked] wrote:
>> Looking at the *Message* buffer, I see errors such as:
>>
>> PNG error: Incompatible libpng version in application and library
>> PNG warning: Application was compiled with png.h from libpng-1.4.3
>> PNG warning: Application  is  running with png.c from libpng-1.2.37
>>    
> The message is quite self explanatory. You need to update your libpng
> installation.

I have also encountered this problem with the prebuilt Win32 binaries.
I've built libpng14.dll and zlib1.dll from upstream sources. To get
emacs to use the new DLLs, I had to update image-library-alist to
include the new DLL name.

It would be helpful for users of binary emacs packages if the image
handling was improved as follows:

1) Display the image DLL version mismatch message in the minibuffer
as well as in the *Messages* buffer, as it is not immediately obvious
what the problem is.

2) Do not cache the results of the image DLL lookup. If the required
DLLs are copied to the emacs/bin directory after emacs is started, it
requires a restart to notice that the DLL is now available.

3) Make the required image DLL version number available at the lisp
level alongside image-library-alist, so the user can determine which
version of the DLL they need to build.

    AndyM