alexmurray / emacs-snap

GNU Emacs in a snap
https://snapcraft.io/emacs
71 stars 13 forks source link

Images aren't displayed #5

Closed aadcg closed 4 years ago

aadcg commented 4 years ago

Hi,

I can't seem to be able to open any image file on Emacs (imagemagick mode). Any ideas on how to fix this?

I'm on Ubuntu 19.04.

alexmurray commented 4 years ago

What version of the snap are you using? Also can you please include details of any error which are displayed when you try and view an image?

alexmurray commented 4 years ago

Ok I just tried it on a Ubuntu 19.04 VM and I believe I can reproduce this - when loading an image all that is shown is a white square, not the actual image:

sudo snap install --classic emacs
emacs /snap/emacs/current/usr/share/emacs/26.3/etc/images/icons/hicolor/128x128/apps/emacs.png

*Messages* buffer shows a heap of:

ImageMagick error: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/504 [2 times]

emacs_no_images_ubuntu_1904

alexmurray commented 4 years ago

Interestingly the snapshot build of emacs from the edge channel (which is current emacs git - 27.0.50) works better for images, likely because upstream has deprecated the imagemagick backend (https://emba.gnu.org/emacs/emacs/commit/d2dea70415ca7ec390a2de11b224ab4cbb2c6b55) and so this uses native code for handling images now. Which gives a strong hint this is likely an issue due to emacs being compiled as a snap with imagemagick on Ubuntu 18.04 but then running on Ubuntu 19.04 with a different imagemagick library or similar.

aadcg commented 4 years ago

Thank you for looking into it. This white square is exactly what I also get. So, I guess the solution would be to run the latest Emacs from the edge channel.

alexmurray commented 4 years ago

@aadcg I am hoping to come up with a solution for the stable channel as well - will keep this bug report updated with progress.

alexmurray commented 4 years ago

This should now be fixed - a new build is now available from the beta channel - if you could please install this as follows:

sudo snap refresh emacs --beta

and then confirm that this is working correctly, I will promote this release to the stable channel and this issue can be closed.

alexmurray commented 4 years ago

Closing this as fixed and promoting this to the stable channel - please reopen if you find it is not working