Subject: [PATCH] View DICOM and Sixel images using image-convert
From: Antero Mejr <[email-masked]>
To: [email-masked]
Date: Mon, 15 May 2023 23:30:13 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

From d03709e75696c7d081012eade721d80f5b725b42 Mon Sep 17 00:00:00 2001
From: Antero Mejr <[email-masked]>
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

From aaeac0b37bd35792dc55fbccc9d5c53e606ac3f1 Mon Sep 17 00:00:00 2001
From: Antero Mejr <[email-masked]>
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