<div dir="ltr">Can you try to add <span>windowToImageFilter->ReadFrontBufferOff(); before calling Update()? </span></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><b>Joachim Pouderoux</b><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="1"><i>PhD, Technical Expert</i></font><br><b><font size="1"><a href="http://www.kitware.fr" target="_blank">Kitware SAS</a></font></b><br></blockquote>
</div></div></div>
<br><div class="gmail_quote">2015-07-22 17:07 GMT+02:00 Manole Buican <span dir="ltr"><<a href="mailto:manole.buican@terrasigna.com" target="_blank">manole.buican@terrasigna.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<p>Hi Joachim</p>
<p> </p>
<p>It's a valid white file.</p>
<p> </p>
<p>Manole</p>
<p> </p>
<div style="FONT-SIZE:16px;FONT-FAMILY:Times New Roman;COLOR:#000000">
<hr>
<div style="DIRECTION:ltr"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Joachim Pouderoux [<a href="mailto:joachim.pouderoux@kitware.com" target="_blank">joachim.pouderoux@kitware.com</a>]<br>
<b>Sent:</b> Wednesday, July 22, 2015 6:05 PM<br>
<b>To:</b> Manole Buican<br>
<b>Cc:</b> <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
<b>Subject:</b> Re: [vtk-developers] PNG problem<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">
<div>Hi Manole,<br>
<br>
Is the the 2KB PNG file valid and defines an empty/all black image ?<br>
<br>
</div>
Joachim<br>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div>
<div dir="ltr"><b>Joachim Pouderoux</b><br>
<blockquote style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:rgb(204,204,204) 1px solid">
<font size="1"><i>PhD, Technical Expert</i></font><br>
<b><font size="1"><a href="http://www.kitware.fr" target="_blank">Kitware SAS</a></font></b><br>
</blockquote>
</div>
</div>
</div>
<br>
<div class="gmail_quote">2015-07-22 16:47 GMT+02:00 Manole Buican <span dir="ltr">
<<a href="mailto:manole.buican@terrasigna.com" target="_blank">manole.buican@terrasigna.com</a>></span>:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
<div>
<div style="FONT-SIZE:10pt;FONT-FAMILY:Tahoma;COLOR:#000000;DIRECTION:ltr">
Hi all, <br>
<br>
<span>Code like </span><br>
<br>
<span>void DlgResVis2D::saveTmpPicture(QString &filename) </span><br>
<span>{ </span><br>
<span> vtkNew<vtkWindowToImageFilter> windowToImageFilter; </span><br>
<span> vtkWindow* pRenderWindow = (vtkWindow *) m_pView->GetRenderWindow();
</span><br>
<br>
<span> windowToImageFilter->SetInput(pRenderWindow); </span><br>
<span> windowToImageFilter->SetMagnification(1); </span><br>
<span> windowToImageFilter->SetInputBufferTypeToRGBA(); </span><br>
<span> windowToImageFilter->Update(); </span><br>
<br>
<span> vtkSmartPointer <vtkPNGWriter> writer = vtkSmartPointer <vtkPNGWriter>::New();
</span><br>
<span> writer->SetFileName(filename.<span>toAscii</span>()); </span><br>
<span> writer->SetInputConnection(windowToImageFilter->GetOutputPort()); </span>
<br>
<span> writer->Write(); </span><br>
<span>} </span><br>
<br>
<span><span>exports</span> a picture in <span>PNG</span> on 5 computers. On the sixth computer produce only a 2KB empty
<span>PNG</span> file (no error is prompted), while on each other 5 computers produce 35KB
<span>PNG</span> file with the same <span>image</span>. </span><br>
<span>Does anybody encounter the same behavior? </span><br>
<br>
<span>Thx in advance, </span><br>
<span>Manole Buican </span><br>
</div>
</div>
<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>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">
http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div>
</div>
</blockquote></div><br></div>