[vtk-developers] PNG problem

Manole Buican manole.buican at terrasigna.com
Fri Jul 24 03:44:33 EDT 2015


Hi Joachim,



I tried what you suggested, but.. the same results. The system involved is a machine with Genuine Intel (R) CPU, U7300 @ 1.3 GHz, RAM 4 GB, Win 7, 64 bits and Mobile Intel(R) 4 Series Express Chipset Family video card.



Thx,

Manole



________________________________
From: Joachim Pouderoux [joachim.pouderoux at kitware.com]
Sent: Wednesday, July 22, 2015 6:08 PM
To: Manole Buican
Cc: vtk-developers at vtk.org
Subject: Re: [vtk-developers] PNG problem

Can you try to add windowToImageFilter->ReadFrontBufferOff(); before calling Update()?

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

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

Hi Joachim



It's a valid white file.



Manole



________________________________
From: Joachim Pouderoux [joachim.pouderoux at kitware.com<mailto:joachim.pouderoux at kitware.com>]
Sent: Wednesday, July 22, 2015 6:05 PM
To: Manole Buican
Cc: vtk-developers at vtk.org<mailto:vtk-developers at vtk.org>
Subject: Re: [vtk-developers] PNG problem

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<mailto: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<http://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/20150724/7dadf74b/attachment.html>


More information about the vtk-developers mailing list