src/gui.cpp

changeset 255
67d4aedf1041
parent 254
434c9844e45d
child 257
481566b60ecd
--- a/src/gui.cpp	Fri May 24 19:44:53 2013 +0300
+++ b/src/gui.cpp	Fri May 24 20:38:55 2013 +0300
@@ -1131,4 +1131,9 @@
 	
 	assert (g_metacursor < MAX_ACTIONS);
 	g_actionMeta[g_metacursor++] = meta;
+}
+
+QImage imageFromScreencap (uchar* data, ushort w, ushort h) {
+	// GL and Qt formats have R and B swapped. Also, GL flips Y - correct it as well.
+	return QImage (data, w, h, QImage::Format_ARGB32).rgbSwapped ().mirrored ();
 }
\ No newline at end of file

mercurial