Skip to content

Commit 8728c31

Browse files
author
florianlink
committed
added QImage constructor from uchar*
git-svn-id: https://pythonqt.svn.sourceforge.net/svnroot/pythonqt/trunk@216 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
1 parent 18f2467 commit 8728c31

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

generator/typesystem_gui.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,14 @@
12531253
</conversion-rule>
12541254
</modify-argument>
12551255
</modify-function>
1256-
1256+
<inject-code class="pywrap-h">
1257+
QImage* new_QImage( const uchar * data, int width, int height, QImage::Format format )
1258+
{
1259+
QImage* image = new QImage(width, height, format);
1260+
memcpy(image-&gt;bits(), data, image-&gt;byteCount());
1261+
return image;
1262+
}
1263+
</inject-code>
12571264
</value-type>
12581265

12591266
<value-type name="QColormap" delete-in-main-thread="yes">

0 commit comments

Comments
 (0)