I want to just create a monochrome (1 bit) file of any size maybe 100 x 50 pixels.
Can you tell what is wrong in the code I have posted ? or you need more information related to code
Posts made by AJ_111
creating an .bmp file
i'm new to PyQt and trying to create .bmp file with code below:
self.img = QtGui.QImage(100, 50, QtGui.QImage.Format_Mono) self.paint_img = QtGui.QPainter() self.paint_img.drawText(self.img.rect(), Qt.AlignCenter, "Hello") self.img.save("test.bmp")
after running the output of the code is :
the .bmp file gets generated ,but the test "Hello" is not generated.
Can someone help me to fix this issue ?