Function: gnus-grab-cam-x-face

gnus-grab-cam-x-face is a byte-compiled function defined in gnus-fun.el.gz.

Signature

(gnus-grab-cam-x-face)

Documentation

Grab a picture off the camera and make it into an X-Face.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-fun.el.gz
(defun gnus-grab-cam-x-face ()
  "Grab a picture off the camera and make it into an X-Face."
  (shell-command "xawtv-remote snap ppm")
  (let ((file nil))
    (while (null (setq file (directory-files "/tftpboot/sparky/tmp"
					     t "snap.*ppm")))
      (sleep-for 1))
    (setq file (car file))
    (with-temp-buffer
      (shell-command
       (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>%s | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface"
	       file null-device)
       (current-buffer))
      (delete-file file)
      (buffer-string))))