123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- (defun uncompface (face)
- "Convert FACE to pbm.
- Requires the external programs `uncompface', and `icontopbm'. On a
- GNU/Linux system these might be in packages with names like `compface'
- or `faces-xface' and `netpbm' or `libgr-progs', for instance."
- (with-temp-buffer
- (unless (featurep 'xemacs) (set-buffer-multibyte nil))
- (insert face)
- (let ((coding-system-for-read 'raw-text)
-
-
- (coding-system-for-write 'binary))
- (and (eq 0 (apply 'call-process-region (point-min) (point-max)
- "uncompface"
- 'delete '(t nil) nil))
- (progn
- (goto-char (point-min))
- (insert "/* Format_version=1, Width=48, Height=48, Depth=1,\
- Valid_bits_per_item=16 */\n")
-
-
-
- (if (not (featurep 'xemacs))
- (eq 0 (call-process-region (point-min) (point-max)
- "icontopbm"
- 'delete '(t nil)))
- (shell-command-on-region (point-min) (point-max)
- "icontopbm | pnmnoraw"
- (current-buffer) t)
- t))
- (buffer-string)))))
- (provide 'compface)
|