;;;
;; (for XEmacs 19.12 or later)
-(defun mime-view-filter-for-image (ctype params encoding)
+(defun mime-view-filter-for-image (situation)
(let ((beg (point-min))
(end (point-max)))
(remove-text-properties beg end '(face nil))
(message "Decoding image...")
- (mime-decode-region beg end encoding)
- (let* ((minor (cdr (assoc ctype mime-view-image-converter-alist)))
+ (mime-decode-region beg end (cdr (assq 'encoding situation)))
+ (let* ((minor (cdr (assoc (mime-type/subtype-string
+ (cdr (assq 'type situation))
+ (cdr (assq 'subtype situation)))
+ mime-view-image-converter-alist)))
(gl (image-normalize minor (buffer-string)))
e)
(delete-region (point-min)(point-max))
;;;
;; (for XEmacs 19.14 or later)
-(defun mime-view-filter-for-application/postscript (ctype params encoding)
- (let* ((beg (point-min)) (end (point-max))
- (file-base
- (make-temp-name (expand-file-name "tm" mime-temp-directory)))
- (ps-file (concat file-base ".ps"))
- (gif-file (concat file-base ".gif"))
- )
- (remove-text-properties beg end '(face nil))
- (message "Decoding Postscript...")
- (mime-decode-region beg end encoding)
- (write-region (point-min)(point-max) ps-file)
- (message "Decoding Postscript...")
- (delete-region (point-min)(point-max))
- (call-process mime-view-ps-to-gif-command nil nil nil ps-file)
- (set-extent-end-glyph (make-extent (point) (point))
- (make-glyph (vector 'gif :file gif-file)))
- (message "Decoding Postscript... done")
- (delete-file ps-file)
- (delete-file gif-file)
- ))
+;; (defun mime-view-filter-for-application/postscript (ctype params encoding)
+;; (let* ((beg (point-min)) (end (point-max))
+;; (file-base
+;; (make-temp-name (expand-file-name "tm" mime-temp-directory)))
+;; (ps-file (concat file-base ".ps"))
+;; (gif-file (concat file-base ".gif"))
+;; )
+;; (remove-text-properties beg end '(face nil))
+;; (message "Decoding Postscript...")
+;; (mime-decode-region beg end encoding)
+;; (write-region (point-min)(point-max) ps-file)
+;; (message "Decoding Postscript...")
+;; (delete-region (point-min)(point-max))
+;; (call-process mime-view-ps-to-gif-command nil nil nil ps-file)
+;; (set-extent-end-glyph (make-extent (point) (point))
+;; (make-glyph (vector 'gif :file gif-file)))
+;; (message "Decoding Postscript... done")
+;; (delete-file ps-file)
+;; (delete-file gif-file)
+;; ))
;; If you would like to display inline Postscript image, please
;; activate following: