<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Use the drop in code in <a href="https://lorensen.github.io/VTKExamples/site/Python/Snippets/">https://lorensen.github.io/VTKExamples/site/Python/Snippets/</a>, in particular: <a href="https://lorensen.github.io/VTKExamples/site/Python/Snippets/WriteImage/">https://lorensen.github.io/VTKExamples/site/Python/Snippets/WriteImage/</a></div><div class="gmail_default" style="font-size:small">These are designed for copy/pasting into your code (there is also a C++ equivalent and a cut-down Java one available too). This code works.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default">I suspect that you need to set SetInputBufferTypeToRGB() in vtkWindowToImageFilter.<br><br>I'm currently working through all the Python examples and I'll fix this one when I get to it.</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">Regards</div><div class="gmail_default">   Andrew<br><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>---------- Forwarded message ----------<br>From: <span class="gmail_default" style="font-size:small"></span>Elhassan Abdou <<a href="mailto:elhassan.abdou@gmail.com" target="_blank">elhassan.abdou@gmail.com</a>><br>To: <span class="gmail_default" style="font-size:small"></span>szx0112 <<a href="mailto:szx0112@gmail.com" target="_blank">szx0112@gmail.com</a>><br>Cc: VTK Users <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>Bcc: <br>Date: Tue, 8 Jan 2019 09:58:47 +0100<br>Subject: Re: [vtkusers] VTK Screenshot save images different as the visualization in renderer window<br><div dir="ltr">Hi all<div><br></div><div>I am facing a similar problem any answer or solution for this issue</div><div><br></div><div>Regards</div><div>Elhassan </div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 7, 2019 at 12:37 AM szx0112 <<a href="mailto:szx0112@gmail.com" target="_blank">szx0112@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I follow the tutorial for screenshot in python: <br>
<a href="https://lorensen.github.io/VTKExamples/site/Python/Utilities/Screenshot/" rel="noreferrer" target="_blank">https://lorensen.github.io/VTKExamples/site/Python/Utilities/Screenshot/</a><br>
<<a href="https://lorensen.github.io/VTKExamples/site/Python/Utilities/Screenshot/" rel="noreferrer" target="_blank">https://lorensen.github.io/VTKExamples/site/Python/Utilities/Screenshot/</a>>  <br>
<br>
This is the camera view in the renderer window<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/t342668/unnamed.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/file/t342668/unnamed.png</a>> <br>
<br>
The screen shot suppose to capture this camera view, however the saved png<br>
image is a different view:<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/t342668/unnamed-2.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/file/t342668/unnamed-2.png</a>> <br>
<br>
Am I using the right method? Any comment is appreciated<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div>
<br><br><br></blockquote></div>-- <br><div dir="ltr" class="gmail_signature">___________________________________________<br>Andrew J. P. Maclean<br><br>___________________________________________</div></div></div></div></div>