GNU bug report logs - #79109
More Image converter formats

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Mon, 28 Jul 2025 06:18:02 UTC

Severity: normal

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

To reply to this bug, email your comments to 79109 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#79109; Package emacs. (Mon, 28 Jul 2025 06:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 28 Jul 2025 06:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: More Image converter formats
Date: Mon, 28 Jul 2025 09:06:06 +0300
[Message part 1 (text/plain, inline)]
Two improvements for image converter formats:

1. Add AVIF to image file types supported by 'image-convert'.
   The duplicate line for '.webp' is removed since WEBP
   is supported natively now.  But still WEBP is added to
   'imagemagick-enabled-types' for the case when WEBP libs
   are not available.

2. Improve support for XCF by merging all layers.

[image-converter_avif_xcf.patch (text/x-diff, inline)]
diff --git a/lisp/files.el b/lisp/files.el
index c05f4fa0e4a..23a8d83ab28 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3248,6 +3248,7 @@ auto-mode-alist
     ;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too.
     ("\\.[1-9]\\'" . nroff-mode)
     ;; Image file types probably supported by `image-convert'.
+    ("\\.avif\\'" . image-mode)
     ("\\.art\\'" . image-mode)
     ("\\.avs\\'" . image-mode)
     ("\\.bmp\\'" . image-mode)
@@ -3287,7 +3288,6 @@ auto-mode-alist
     ("\\.six\\'" . image-mode)
     ("\\.tga\\'" . image-mode)
     ("\\.wbmp\\'" . image-mode)
-    ("\\.webp\\'" . image-mode)
     ("\\.wmf\\'" . image-mode)
     ("\\.wpg\\'" . image-mode)
     ("\\.xcf\\'" . image-mode)
diff --git a/lisp/image.el b/lisp/image.el
index 40d1364430f..b95dd230914 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -1174,14 +1174,14 @@ imagemagick-types-inhibit
   :version "24.3")
 
 (defcustom imagemagick-enabled-types
-  '(3FR ARW AVS BMP BMP2 BMP3 CAL CALS CMYK CMYKA CR2 CRW
+  '(3FR ARW AVIF AVS BMP BMP2 BMP3 CAL CALS CMYK CMYKA CR2 CRW
     CUR CUT DCM DCR DCX DDS DJVU DNG DPX EXR FAX FITS GBR GIF
     GIF87 GRB HRZ ICB ICO ICON J2C JNG JP2 JPC JPEG JPG JPX K25
     KDC MIFF MNG MRW MSL MSVG MTV NEF ORF OTB PBM PCD PCDS PCL
     PCT PCX PDB PEF PGM PICT PIX PJPEG PNG PNG24 PNG32 PNG8 PNM
     PPM PSD PTIF PWP RAF RAS RBG RGB RGBA RGBO RLA RLE SCR SCT
     SFW SGI SIX SR2 SRF SUN SVG SVGZ TGA TIFF TIFF64 TILE TIM TTF
-    UYVY VDA VICAR VID VIFF VST WBMP WPG X3F XBM XC XCF XPM XV
+    UYVY VDA VICAR VID VIFF VST WBMP WEBP WPG X3F XBM XC XCF XPM XV
     XWD YCbCr YCbCrA YUV)
   "List of ImageMagick types to treat as images.
 Each list element should be a string or symbol, representing one
diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index 5fe52b98a28..c149addb773 100644
--- a/lisp/image/image-converter.el
+++ b/lisp/image/image-converter.el
@@ -65,7 +65,8 @@ image-converter-file-name-extensions
 (defvar image-converter--converters
   '((graphicsmagick :command ("gm" "convert") :probe ("-list" "format"))
     (ffmpeg :command "ffmpeg" :probe "-decoders")
-    (imagemagick :command "convert" :probe ("-list" "format")))
+    ;; "-layers merge" allows merging all layers in Gimp XCF files.
+    (imagemagick :command ("convert" "-layers" "merge") :probe ("-list" "format")))
   "List of supported image converters to try and required command-line switches.")
 
 (defvar image-converter--extra-converters (make-hash-table :test #'equal))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79109; Package emacs. (Tue, 29 Jul 2025 06:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 79109 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: 79109 <at> debbugs.gnu.org
Subject: Re: bug#79109: More Image converter formats
Date: Tue, 29 Jul 2025 09:43:42 +0300
close 79109 31.0.50
stop

> Two improvements for image converter formats:
>
> 1. Add AVIF to image file types supported by 'image-convert'.
>    The duplicate line for '.webp' is removed since WEBP
>    is supported natively now.  But still WEBP is added to
>    'imagemagick-enabled-types' for the case when WEBP libs
>    are not available.
>
> 2. Improve support for XCF by merging all layers.

Pushed and closed.




bug marked as fixed in version 31.0.50, send any further explanations to 79109 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Tue, 29 Jul 2025 06:46:02 GMT) Full text and rfc822 format available.

This bug report was last modified 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.