1

I'd like to take a window (or part of it) as a bitmap and save it as an image. This is basically a screenshot functionality.

I'd like to do it with emacs lisp so that screenshot taking can be scripted.

I'm using Aquamacs, but I'm not bound to be using exactly this version of Emacs.

Malabarba
  • 23,148
  • 6
  • 79
  • 164
Gracjan Polak
  • 1,102
  • 6
  • 21
  • I'd be surprised if you could do this -- it would require that emacs "know" about the pixels on the screen, and I doubt that it does. Only the windowing system would know that. – offby1 Jan 16 '15 at 23:26
  • Specific versions of Emacs may have necessary screen grabing functionality. That is why I'm asking. – Gracjan Polak Jan 16 '15 at 23:29

2 Answers2

3

Emacs itself cannot, however there's nothing that says it can't call out to a program that can. Some solutions include:

  • screenshot, which uses an ImageMagick backend
  • capture, which uses FFmpeg or aconv as a backend
  • camcorder, which can do screencasts with FFmpeg as a backend

All of these are designed for interactive use, so your mileage may vary when automating it with Emacs Lisp.

PythonNut
  • 10,363
  • 2
  • 30
  • 76
-1

I wrote my own scripted screenshot taker:

https://github.com/gracjan/gifcast.el

Gracjan Polak
  • 1,102
  • 6
  • 21