summaryrefslogtreecommitdiff
path: root/pages/screenshot.ecpp
blob: a84d82db4d80d053082d005e2d5fa69c37036599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<%pre>
#include <vdr/device.h>
</%pre>
<%args>
int quality = 80;
int width = 320;
int height = 240;
</%args>
<%cpp>
	reply.setContentType("image/jpg");

	cDevice* device = cDevice::PrimaryDevice();
	if ( device == 0 )
		return DECLINED;

	int size;
	uchar* image = device->GrabImage( size, true, quality, width, height );
	if ( image == 0 )
		return DECLINED;

	reply.out().write( reinterpret_cast< char* >( image ), size );
</%cpp>