]> Creatis software - clitk.git/commitdiff
With Qt4, debug the screenshot
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 15 Sep 2016 09:54:09 +0000 (11:54 +0200)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 15 Sep 2016 09:54:09 +0000 (11:54 +0200)
vv/vvMainWindow.cxx

index 1bc0759e8ee14671f60a29dcc493623f2f0293b0..79b28058f24bafe5b21d7a9568c728d01b74981b 100644 (file)
@@ -3323,6 +3323,8 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget)
   if (!fileName.isEmpty()) {
     vtkSmartPointer<vtkWindowToImageFilter> w2i = vtkSmartPointer<vtkWindowToImageFilter>::New();
     w2i->SetInput(widget->GetRenderWindow());
+    w2i->SetMagnification(1);
+    w2i->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel
     w2i->Update();
     vtkImageData *image = w2i->GetOutput();