From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Antero Mejr via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63531: [PATCH] View DICOM and Sixel images using image-convert Date: Mon, 15 May 2023 23:30:13 +0000 Message-ID: <87cz31fa0q.fsf@mailbox.org> Reply-To: Antero Mejr Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33436"; mail-complaints-to="usenet@ciao.gmane.io" To: 63531@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 16 01:31:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pyhf1-0008VI-IC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 May 2023 01:31:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyhej-00081H-Ko; Mon, 15 May 2023 19:31:05 -0400 Original-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 1pyheg-000817-RT for bug-gnu-emacs@gnu.org; Mon, 15 May 2023 19:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pyheg-0002hb-CN for bug-gnu-emacs@gnu.org; Mon, 15 May 2023 19:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pyhef-0002WI-O0 for bug-gnu-emacs@gnu.org; Mon, 15 May 2023 19:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 May 2023 23:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16841934489665 (code B ref -1); Mon, 15 May 2023 23:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 May 2023 23:30:48 +0000 Original-Received: from localhost ([127.0.0.1]:44700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyheS-0002Vo-Am for submit@debbugs.gnu.org; Mon, 15 May 2023 19:30:48 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyheM-0002Vc-Tz for submit@debbugs.gnu.org; Mon, 15 May 2023 19:30:47 -0400 Original-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 1pyheL-0007ye-Lb for bug-gnu-emacs@gnu.org; Mon, 15 May 2023 19:30:41 -0400 Original-Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pyheC-0002eh-5o for bug-gnu-emacs@gnu.org; Mon, 15 May 2023 19:30:37 -0400 Original-Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4QKwZv6zNzz9sW0 for ; Tue, 16 May 2023 01:30:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1684193415; 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=gUSFpt++gA0y3msOxzIMT2iHu1OefJWkN3HfTS2HnM8=; b=ggTQ9TpPO6joM5Jg+JNfnbeDGZK3A30cat0k+lCDQ6ZM2xhn8OsNxC0NdEUnUYXS41j0ct qs4mPdukp1iqu1eQQgt/QGk9irLrkESCbIxbhtM/e+e+/Rk+r6X9XMAaTXm5gQky7aabMU ZUkZYm40F6bowpXuNjTuc7xbvBC8QGL3Qbd7g5fsLTSSJkpxV5tkt43j2yiGdfrgQ9i13q oY76u+FhgiDY+ehDAfC3c2UhviytLW4olmGm94EvGDre91gebdJ+wzQpVwkwG0ZC0GEwsi keWY0355/W8eFYYGwqAJqs7gW9y2zo483sDw7MGObDyUCaS6/+cHpoVvV7i00Q== X-MBO-RS-META: rb77qbnzka5htmj1rww5ggichige3dhg X-MBO-RS-ID: 07a42a90b1486ec5b12 Received-SPF: pass client-ip=2001:67c:2050:0:465::102; envelope-from=antero@mailbox.org; helo=mout-p-102.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_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261771 Archived-At: --=-=-= Content-Type: text/plain These patches add .dcm and .six to auto-mode-alist, so they can be viewed with image-convert. The Six patch also adds SIX as an ImageMagick type. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-viewing-.six-images-via-image-convert.patch >From d03709e75696c7d081012eade721d80f5b725b42 Mon Sep 17 00:00:00 2001 From: Antero Mejr Date: Mon, 15 May 2023 21:21:12 +0000 Subject: [PATCH 1/2] Allow viewing .six images via image-convert. * lisp/files.el (auto-mode-alist): Support the Sixel .six image format. * lisp/image.el (imagemagick-enabled-types): Add SIX. --- lisp/files.el | 1 + lisp/image.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 148f47cbc97..ba338e01c6b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3082,6 +3082,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\|SQUASHFS\\)\\'" . ("\\.pict\\'" . image-mode) ("\\.rgb\\'" . image-mode) ("\\.rgba\\'" . image-mode) + ("\\.six\\'" . image-mode) ("\\.tga\\'" . image-mode) ("\\.wbmp\\'" . image-mode) ("\\.webp\\'" . image-mode) diff --git a/lisp/image.el b/lisp/image.el index 08190cf86bc..72811b2b197 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -1127,7 +1127,7 @@ has no effect." 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 SR2 SRF SUN SVG SVGZ TGA TIFF TIFF64 TILE TIM TTF + 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 XWD YCbCr YCbCrA YUV) "List of ImageMagick types to treat as images. -- 2.39.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Allow-viewing-.dcm-images-via-image-convert.patch >From aaeac0b37bd35792dc55fbccc9d5c53e606ac3f1 Mon Sep 17 00:00:00 2001 From: Antero Mejr Date: Mon, 15 May 2023 23:15:33 +0000 Subject: [PATCH 2/2] Allow viewing .dcm images via image-convert. * lisp/files.el (auto-mode-alist): Support the DICOM .dcm image format. --- lisp/files.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/files.el b/lisp/files.el index ba338e01c6b..2e42d0e74d1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3053,6 +3053,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\|SQUASHFS\\)\\'" . ("\\.cmyk\\'" . image-mode) ("\\.cmyka\\'" . image-mode) ("\\.crw\\'" . image-mode) + ("\\.dcm\\'" . image-mode) ("\\.dcr\\'" . image-mode) ("\\.dcx\\'" . image-mode) ("\\.dng\\'" . image-mode) -- 2.39.2 --=-=-=--