Since 0.8.2, Ristretto does not load any bitmap (*.bmp) images. There is no error message or log in the terminal. 0.8.1 was able to load bitmaps fine. I've tested both versions in Arch linux and Xubuntu 16.04. I checked the code under debugger and found this is a regression introduced by libmagic support, added in this commit: https://git.xfce.org/apps/ristretto/commit/?id=2640c26d9b5b4332db8230ba82337ff7d97fb0bd It seems the mime-type returned by libmagic is not compatible with gtk pixbuf formats that it's checked against. Gtk expects 'image/bmp' but libmagic returns 'image/x-ms-bmp', or just 'application/octet-stream' in some cases. Disabling libmagic and using the old GFileInfo code fixes it for me. Considering we use Gtk everywhere else, I feel it's consistent that we use GFileInfo here rather than a different library. Was there any specific reason why the switch to libmagic was necessary?
I can also confirm this issue.
Hi, thanks for reporting this! The reason for introducing libmagic was that GFileInfo determines image type based on the file extension, and in case they do not match (e.g. a JPEG image stored in a *.png file), the image would fail to open. libmagic solves this problem. However, it seems I need to look into how to handle cases when libmagic fails to properly determine MIME type.
Since libmagic seems to be only using "image/x-ms-bmp" for BMP files (https://github.com/file/file/blob/898f5d27b66b5d5592cb56fa9da5b776628ea6ca/magic/Magdir/images#L553), I've decided to just replace this string with "image/bmp" that GTK understand. Please let me know if there any issues. Fixed by https://git.xfce.org/apps/ristretto/commit/?id=751834055dfc8831bfe06ed5e493c69b8347668a