Function: gnus-grab-cam-face
gnus-grab-cam-face is a byte-compiled function defined in
gnus-fun.el.gz.
Signature
(gnus-grab-cam-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-face ()
"Grab a picture off the camera and make it into an X-Face."
(shell-command "xawtv-remote snap ppm")
(let ((file nil)
(tempfile (make-temp-file "gnus-face-" nil ".ppm"))
result)
(while (null (setq file (directory-files "/tftpboot/sparky/tmp"
t "snap.*ppm")))
(sleep-for 1))
(setq file (car file))
(shell-command
(format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale -width 48 -height 48 | ppmtopgm >> %s"
file tempfile))
(let ((gnus-convert-image-to-face-command
(format "cat '%%s' | ppmquant %%d | ppmchange %s | pnmtopng"
(gnus-fun-ppm-change-string))))
(setq result (gnus-face-from-file tempfile)))
(delete-file file)
result))