[Qt-interest] Saving image rendered in openGL widget in different resolutions

Fabio Dago fabio.dago at sir.to.it
Fri Feb 13 16:32:19 CET 2009


You can use this:

QPixmap QGLWidget::renderPixmap <qglwidget.html#renderPixmap> ( int w = 
0, int h = 0, bool useContext = false )

Regards.

Fabio

anjani gupta ha scritto:
> Hi,
>  
> I want to save openGL image rendered on main window in different file 
> formats with different resolutions.
> To save image in different format, I am using the following code:
>  
> <code>
> QGLWidget* main_window;
> //Assign value to main_window
> ...
> main_window->raise();
> main_window->repaint();
> QPixmap image = QPixmap::grabWindow(main_window->winId());
> image.save("filename","TIF"));
> </code>
>  
> I want to save image in different resolutions.Is there some efficient 
> way to save image in different resolutions?
>  
> Thanks in advance!
>  
> Regards,
> Anjani
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.0.234 / Virus Database: 270.10.23/1948 - Release Date: 02/12/09 07:20:00
>
>   



More information about the Qt-interest-old mailing list