summaryrefslogtreecommitdiffstats
blob: c3acd6961ed8b3d5210e0aabbb92b6053806a82d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2012 Yoann Blein
 * Licensed under the simplified BSD license.
 * See Documentation/Licenses/BSD-simplified.txt for more information.
 */

#include <Swiften/ScreenSharing/Image.h>

namespace Swift {

Image::Image(int width, int height, uint8_t* rgb24data)
	: width(width), height(height)
{
	int len = width * height * 3;
	if (rgb24data) {
		data.insert(data.begin(), rgb24data, rgb24data + len);
	} else {
		data.resize(len);
	}
}

}