Hi dear friends,
I want to make a screenshot of a VTK Renderer into a PNG stream.
Way to go is obviously
vtkNew<vtkRenderLargeImage> renderLarge; renderLarge->SetInput(renderer); vtkNew<vtkPNGWriter> writer; writer->SetInputConnection(renderLarge->GetOutputPort()); writer->WriteToMemoryOn(); writer->Write(); auto png = writer->GetResult();
but I don’t know how to translate the resulting “vtkUnsignedCharArray” into a contiguous “unsigned char*” to pass back to the caller …
Any advice ?