How to extract decded Image stream to memory buffer in c++?

:frowning: DK
9.0.5 for Windows

I’d like to use PDFTron SDK to traverse PDF file, extract specific images into memory buffer and pass it to OpenCV for further processing (MSVC 2019).
It seems to be simple task using ImageExtractTest sample.
The only problem is saving of decoded image filter to externally allocated memory buffer.
I’ve tried to use direct copy, Image2RGB, Export to Memory based FiterWriter. No success :frowning:
Could you please provide some c++ example demonstrating this technique?
Thanks a lot

Please provide a link to a minimal sample where the issue is reproducible:

This forum post contains C# code that you can use to get the image buffer out in memory. For the most part the PDFTron related code/API should be 1:1 going to C++.

Thank you Ryan.
I’ve tested this code with diffrent types of images we are working with.
It seems to work fine and stable.
thanks