-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
5.2.1
-
None
-
Mac X.9.1
Upon pixel size of image... smaller blur radius produces jittery effects... the blur radius value under which the artifacts is produced is depend upon pixel size of original image...
Same algorithm was working fine on 4.8.5
see attached image details (test shown was made on a 600x800 pixels image)
1/ Original
2/ Blur radius of 40
3/ Blur radius of 41
here is the code used...
#include <QtGui> #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) #include <QtWidgets> #endif int main(int argc, char *argv[]) { QApplication a(argc, argv); QGraphicsView view; QGraphicsScene *scene = new QGraphicsScene(); view.setScene(scene); QImage image("ima600x800_original.png"); qreal blur = 41; // render to QImage QPainter painter; painter.begin(&image); QGraphicsPixmapItem *pixmap = new QGraphicsPixmapItem ( QPixmap::fromImage(image), 0 ); // apply the blur effect QGraphicsBlurEffect effect; effect.setBlurHints(QGraphicsBlurEffect::QualityHint); // PerformanceHint = 0x00, QualityHint = 0x01, effect.setBlurRadius(blur); pixmap->setGraphicsEffect(&effect); // add and render to scene scene->addItem(pixmap); scene->render(&painter); view.show(); return a.exec(); }