Combine Multiple Images Into a Single PDF
-
@geor
maybe you could try to scale it before
drawing it to pdf.
the scale function can be adjusted to aim for quality
http://doc.qt.io/qt-5/qpixmap.html#scaled
with Qt::SmoothTransformationnote. it returns the scaled pixmap not modify the original.
so something like
mypixmap = mypixmap.scaled(xx) -
@geor
well it was worth a shot.
I assume you play around with different scales?
Have you tried huge image like 1920x1080 and scale it down?
You are using http://doc.qt.io/qt-5/qpaintdevice.html#logicalDpiX
to calc how much to scale it?I dont remember quality being so bad but i was using a fairly
large resolution so the widget was not that small. -
@mrjj yes I am using it the quality is not so good however if I save it into an image its gives me a good quality so it seems taking an image instead of a pixmap a lot better.
just like this
ui->myWidget->grab().save("image.png");
but this make me save 5 usless Images and I could not find a way to just use it temporarly.. -
@geor
have you tried to convert to qimage and draw it?
http://doc.qt.io/qt-4.8/qpixmap.html#toImage
Not sure why saving as png makes any difference. -