PDA

View Full Version : QGraphicsBlurEffect on pixmap



evergreen
8th June 2011, 09:20
Hello,

I'm trying to apply QGraphicsBlurEffect which inherits QGraphicsEffect, to a QPixmap.
But I can't find a method to do it.
Anyone knows a way to do it?

Thanks

wysota
8th June 2011, 09:47
You can create a graphics scene, add the pixmap to it as a QGraphicsPixmapItem, apply the blur effect to it and render it to a pixmap. Or you can convert the pixmap to a QImage and blur it yourself by applying a convolution filter. You can also write a shader program to blur the texture using your graphics card.

evergreen
8th June 2011, 10:13
Programing myself a blur effect is way out of my league...!
I'll try the graphicScene

wysota
8th June 2011, 11:13
Programing myself a blur effect is way out of my league...!
It's not, blur is a very easy effect to implement.

http://homepages.inf.ed.ac.uk/rbf/HIPR2/mean.htm
http://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm