From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 28 02:17:49 2025 Received: (at submit) by debbugs.gnu.org; 28 Jul 2025 06:17:49 +0000 Received: from localhost ([127.0.0.1]:53815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ugHBE-0007El-EM for submit@debbugs.gnu.org; Mon, 28 Jul 2025 02:17:48 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50340) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ugHBC-0007EE-JF for submit@debbugs.gnu.org; Mon, 28 Jul 2025 02:17:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ugHAz-0000r9-VX for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2025 02:17:38 -0400 Received: from mout-y-111.mailbox.org ([2001:67c:2050:103:465::111]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1ugHAu-0002nK-5P for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2025 02:17:31 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4br7YY0Mrrz9xrm for ; Mon, 28 Jul 2025 08:17:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1753683441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=mYlpqXL1xthwIXsfpoh44E2P2zMiWQa2Ww6F6i72JOg=; b=c34+2knVgfFm27ubG+2CsgPNIMWRARQaneK9ZEQZKD9qGvrS70SfpVEo3QksRHyhSpx3Ms ewKU9VLNugesXtaqy/HqLI7qJmFQS9Ydb9r569HlOy67aWGhv9ZhNqe1zTxkbzY3s6lELg AHMMFvfG/wzqH1ulwgUlSBXKH35L8mT0jsoxKC7jOx2U9t8qNWTgRb6gUe86Dq00pV6CXU U+ccwcTcc3F4FsrdeN0z+jHigITDfm0fKfLigtu3tEbIv4Y9B56WIRVrAqc8e1vw5Rs02a Kh44cjM4eY7Cgs2KW26FXVmK2hkp65KsEtDKrVTYwt140Zp3dOOuo0U9K9afAA== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of juri@linkov.net designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@linkov.net From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: More Image converter formats Organization: LINKOV.NET Date: Mon, 28 Jul 2025 09:06:06 +0300 Message-ID: <8734agx31t.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Rspamd-Queue-Id: 4br7YY0Mrrz9xrm Received-SPF: pass client-ip=2001:67c:2050:103:465::111; envelope-from=juri@linkov.net; helo=mout-y-111.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=image-converter_avif_xcf.patch 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' . 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)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 29 02:45:10 2025 Received: (at 79109) by debbugs.gnu.org; 29 Jul 2025 06:45:11 +0000 Received: from localhost ([127.0.0.1]:59865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uge5G-0001dX-CA for submit@debbugs.gnu.org; Tue, 29 Jul 2025 02:45:10 -0400 Received: from mout-y-111.mailbox.org ([2001:67c:2050:103:465::111]:51664) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uge5D-0001X7-Gd; Tue, 29 Jul 2025 02:45:08 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4brm6x40Zhz9xrm; Tue, 29 Jul 2025 08:44:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1753771497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CN1cwk7nQg43MphG8hAKjAGCIOv1XDbZPQYUctpykuA=; b=YbUAFdLjKb+1/d9ZhuInnL7jtiNt++vsiNmDWEI8DUDIDxzXfuretsCM3rqp281MP/MGnJ uZCh5fiUcrmSy0+xarTJaDo50gN/XtJx9gWr8twzm+xTc7XkhiX7oetTPEDktaeOEvcR3s Soo/unYQy1f6l7V6fSGN4V1UIZ3Mzol/y1ugMYCj97oiiCM2++7HmJfLpVbj5ujKWwVpEl l8fIrJnqAJI9lSG7BOjkUssV5R1yCe1zfUxvpEIY+wI1B+ONakjS5IkoIplfn25dugCIZD 3DhFagQS1pYyIag3+9Lr7VltCQQkjQXhR2NIo0xHwBksjPwJEd1id21bzYaDBg== From: Juri Linkov To: 79109@debbugs.gnu.org Subject: Re: bug#79109: More Image converter formats In-Reply-To: <8734agx31t.fsf@mail.linkov.net> Organization: LINKOV.NET References: <8734agx31t.fsf@mail.linkov.net> Date: Tue, 29 Jul 2025 09:43:42 +0300 Message-ID: <87qzxzh4yp.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79109 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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.