Hi and welcome
I want to generate a indexed colour bitmap (up to 6 colours) image and write some text on it.
The text shouldn't have any kind of blur, just pure one-coloured pixels (the text is going to be tiny, every pixel matter )
I used the standard:
pixmap
= QPixmap(rect.
width(), rect.
height())pixmap.fill(Qt.white)
painter.begin(pixmap)
painter.setFont(font)
painter.rotate(lineAngle)
painter.drawText(linePosX, linePosY, text)
pixmap = QPixmap(rect.width(), rect.height())
pixmap.fill(Qt.white)
painter = QPainter()
painter.begin(pixmap)
painter.setFont(font)
painter.rotate(lineAngle)
painter.drawText(linePosX, linePosY, text)
To copy to clipboard, switch view to plain text mode
The main problem is that when I save the text is a bit blurred.
example.bmp
The second thing is: how to limit the colour number in and image?
Thank you for your help.
Bookmarks