[vtkusers] Screenshots JPEGWriter Iren

Brenton.Thomas at HardYards.info Brenton.Thomas at HardYards.info
Mon Feb 10 00:57:18 EST 2003


When I take a screenshot using vtkImageFilter and vtkJPEGWriter I am losing
control of the interactor.  Does anyone have any ideas?

The screenshot works fine - although best if the mouse if not over any part
of the image.  But for some reason the application will no longer process
mouse events afterword.

If I comment out the vtkJpegWriter->Write(); command everything is fine -
but of course no image.


Help....


void CvtkInfrastructure::Snapshot(CString cFName)
{
 vtkWindowToImageFilter *vtkImageFilter;
 vtkJPEGWriter *vtkJpegWriter;

 vtkImageFilter=vtkWindowToImageFilter::New();
 vtkJpegWriter=vtkJPEGWriter::New();

 vtkImageFilter->SetInput(m_pRenWin);
 vtkJpegWriter->SetInput(vtkImageFilter->GetOutput());

 vtkJpegWriter->SetFileName(cFName);
 vtkJpegWriter->SetQuality(100);
 vtkJpegWriter->ProgressiveOff();
 vtkJpegWriter->Write();

 vtkImageFilter->Delete();
 vtkJpegWriter->Delete();


}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030210/a27ee171/attachment.htm>


More information about the vtkusers mailing list