[vtkusers] vtkJPEGReader can read from memory, vtkPNGReader not. why?

Kolja Petersen petersenkolja at gmail.com
Thu Nov 9 13:25:45 EST 2017


Heya,
I was searching for a solution to read PNG data, when I have their bytes in
memory, not on disk.
You can use vtkJPEGReader::SetMemoryBuffer(addr) for JPEG data. I have
tested this successfully.
In https://github.com/Kitware/VTK/blob/master/IO/Image/vtkJPEGReader.cxx,
starting from line 91, is the code for reading from memory.

Why is there no equivalent for vtkPNGReader? Even if I set the MemoryBuffer
for vtkPNGWriter, it tries to read from file and fails if the file doesn't
exist.
Thank you
Kolja

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171109/910bbb38/attachment.html>


More information about the vtkusers mailing list