hii...
i'm able to create .bmp image.
But the image is not getting converted into Monochrome.
I have tried wth following code :
p.
setRenderHint(QPainter::Antialiasing,blnVar
);
p.setPen(Qt::white);
p.drawText(10,20,"AJ");
bmp.save("d:\\Test.bmp","bmp",-1);
imgTemp = bmp.toImage();
imgTemp.
convertToFormat(QImage::Format_Mono,Qt
::MonoOnly);
imgTemp.save("d:\\tempMono.bmp","bmp",-1);
QPixmap bmp(100,50);
QPainter p(&bmp);
p.setRenderHint(QPainter::Antialiasing,blnVar);
p.setPen(Qt::white);
p.drawText(10,20,"AJ");
bmp.save("d:\\Test.bmp","bmp",-1);
imgTemp = bmp.toImage();
imgTemp.convertToFormat(QImage::Format_Mono,Qt::MonoOnly);
imgTemp.save("d:\\tempMono.bmp","bmp",-1);
To copy to clipboard, switch view to plain text mode
After executing this code, 2 bmp files are created but both are 32 bit.
How to convert it to monochrome format.
Can somebody help me to solve this ?
Bookmarks