[vtkusers] save a jpg file in a specific directory
David Doria
daviddoria+vtk at gmail.com
Sun May 16 17:28:54 EDT 2010
On Sun, May 16, 2010 at 5:23 PM, Renato Cesar Pompeu
<rcpompeu at hotmail.com> wrote:
> Hi all,
>
> How do I save a jpg file in a specific directory that I can choose when
> saving?
>
>
> ...
> vtkSmartPointer<vtkJPEGWriter> writer =
> vtkSmartPointer<vtkJPEGWriter>::New();
> writer->SetFileName("screenshot2.png"); // ?????
> writer->SetInput(windowToImageFilter->GetOutput());
> writer->Write();
> ...
>
>
> Thanks a lot!
Renato,
You can simply put the entire path in the SetFileName call:
writer->SetFileName("/your/path/here/screenshot2.png");
David
More information about the vtkusers
mailing list