I create monochrome images in QImage format :: Format_Mono (1-bit per pixel)
. Then I need to combine them in a certain way, for which I create a scene and add them there. How then can I save the resulting scene in the .tiff format so that the quality of the images remains the same already being in this, combined form?
|
1 answer
If you want to copy "pixel to pixel" what the user sees in QGraphicsView
, you do:
QPixmap pixMap = this->ui->graphicsView->grab(); pixMap.save(fileName);
If you just want to draw a picture from the scene:
QImage image(fn); QPainter painter(&image); painter.setRenderHint(QPainter::Antialiasing); scene.render(&painter); image.save("file_name.png")
The second option is preferable, as it allows you to save a scaled scene.
Code taken from here
- I asked about the quality because the images that I form have a dimension of 7100 x 7100 pixels with a pixel size of 0.00635 mm. unless at transfer on a scene this quality will not be lost? - jesuscrew77 6:18 pm
- @ jesuscrew77 if you doubt so much - compare. - gbg
|