[vtk-developers] PNG problem

Joachim Pouderoux joachim.pouderoux at kitware.com
Wed Jul 22 11:05:23 EDT 2015


Hi Manole,

Is the the 2KB PNG file valid and defines an empty/all black image ?

Joachim

*Joachim Pouderoux*

*PhD, Technical Expert*
*Kitware SAS <http://www.kitware.fr>*


2015-07-22 16:47 GMT+02:00 Manole Buican <manole.buican at terrasigna.com>:

>  Hi all,
>
> Code like
>
> void DlgResVis2D::saveTmpPicture(QString &filename)
> {
>         vtkNew<vtkWindowToImageFilter> windowToImageFilter;
>         vtkWindow* pRenderWindow = (vtkWindow *)
> m_pView->GetRenderWindow();
>
>         windowToImageFilter->SetInput(pRenderWindow);
>         windowToImageFilter->SetMagnification(1);
>         windowToImageFilter->SetInputBufferTypeToRGBA();
>         windowToImageFilter->Update();
>
>         vtkSmartPointer <vtkPNGWriter> writer = vtkSmartPointer
> <vtkPNGWriter>::New();
>         writer->SetFileName(filename.toAscii());
>         writer->SetInputConnection(windowToImageFilter->GetOutputPort());
>         writer->Write();
> }
>
> exports a picture in PNG on 5 computers. On the sixth computer produce
> only a 2KB empty PNG file (no error is prompted), while on each other 5
> computers produce 35KB PNG file with the same image.
> Does anybody encounter the same behavior?
>
> Thx in advance,
> Manole Buican
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150722/cac54dff/attachment.html>


More information about the vtk-developers mailing list