1 ;;; compface.el --- functions for converting X-Face headers
2 ;; Copyright (C) 2002 Free Software Foundation, Inc.
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
29 (defun uncompface (face)
31 Requires the external programs `uncompface', and `icontopbm'. On a
32 GNU/Linux system these might be in packages with names like `compface'
33 or `faces-xface' and `netpbm' or `libgr-progs', for instance."
36 (and (eq 0 (apply 'call-process-region (point-min) (point-max)
38 'delete '(t nil) nil))
40 (goto-char (point-min))
41 (insert "/* Width=48, Height=48 */\n")
42 ;; I just can't get "icontopbm" to work correctly on its
43 ;; own in XEmacs. And Emacs doesn't understand un-raw pbm
45 (if (not (featurep 'xemacs))
46 (eq 0 (call-process-region (point-min) (point-max)
49 (shell-command-on-region (point-min) (point-max)
50 "icontopbm | pnmnoraw"
57 ;;; compface.el ends here