From xemacs-m  Fri May 23 16:41:50 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id QAA17572
	for <xemacs-beta@xemacs.org>; Fri, 23 May 1997 16:41:49 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id OAA19032;
	Fri, 23 May 1997 14:42:06 -0700
Mail-Copies-To: never
To: tm-en@chamonix.jaist.ac.jp
Cc: xemacs-beta@xemacs.org
Subject: [tm PATCH] image/png handling for XEmacs
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@xemacs.org>
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
Date: 23 May 1997 14:42:06 -0700
Message-ID: <m23erdc1ch.fsf@altair.xemacs.org>
Lines: 84
X-Mailer: Gnus v5.4.53/XEmacs 20.3(beta3)

;;; When should tm be replaced by SEMI in XEmacs beta 20.3?

I was playing around with Neal Becker's libgr-friendly xv with
integrated PNG support and discovered that tm didn't grok image/png.

These patches are against the tm merged with XEmacs 20.2 and are
primarily of interest to users of XEmacs 19.15 and 20.2.

1997-05-23  Steven L Baur  <steve@altair.xemacs.org>

	* tm/tm-view.el (mime/content-decoding-condition): Add image/png
	mime type.

	* tm/tm-image.el (toplevel): Add image/png mime type.

	* tm/tm-edit.el (mime-file-types): Add png handling.
	(mime-content-types): Ditto.

Index: tm-view.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/tm/tm-view.el,v
retrieving revision 1.4
diff -u -r1.4 tm-view.el
--- tm-view.el	1997/04/24 04:00:14	1.4
+++ tm-view.el	1997/05/23 21:10:34
@@ -77,6 +77,10 @@
      (method "tm-image" nil 'file 'type 'encoding 'mode 'name)
      (mode "play" "print")
      )
+    ((type . "image/png")
+     (method "tm-image" nil 'file 'type 'encoding 'mode 'name)
+     (mode "play" "print")
+     )
     ((type . "image/tiff")
      (method "tm-image" nil 'file 'type 'encoding 'mode 'name)
      (mode "play" "print")

Index: tm-image.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/tm/tm-image.el,v
retrieving revision 1.5
diff -u -r1.5 tm-image.el
--- tm-image.el	1997/03/16 03:05:46	1.5
+++ tm-image.el	1997/05/23 21:25:02
@@ -132,6 +132,7 @@
 	  ("image/x-xpixmap"		. xpm)
 	  ("image/x-pic"		. pic)
 	  ("image/x-mag"		. mag)
+	  ("image/png"			. png)
 	  ))
 
 (defvar mime-viewer/ps-to-gif-command "pstogif")

Index: tm-edit.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/tm/tm-edit.el,v
retrieving revision 1.9
diff -u -r1.9 tm-edit.el
--- tm-edit.el	1997/03/22 06:02:45	1.9
+++ tm-edit.el	1997/05/23 21:08:38
@@ -210,6 +210,7 @@
     ("image"
      ("gif")
      ("jpeg")
+     ("png")
      ("tiff")
      ("x-pic")
      ("x-mag")
@@ -242,6 +243,11 @@
      )
     ("\\.gif$"
      "image"	"gif"		nil
+     "base64"
+     "inline"		(("filename" . file))
+     )
+    ("\\.png$"
+     "image"	"png"		nil
      "base64"
      "inline"		(("filename" . file))
      )

-- 
steve@calag.com baur
Unsolicited commercial e-mail will be billed at $250/message.

