PDF-Writer icon indicating copy to clipboard operation
PDF-Writer copied to clipboard

Reading image from memory

Open adithyakanchan opened this issue 6 years ago • 2 comments

Do we have a function for reading an image from memory?

adithyakanchan avatar Aug 30 '18 16:08 adithyakanchan

yes. while DrawImage itself doesn't accept custom streams (non file), any of the type specific methods, does.

look in Custom input and output. there are some examples here.

galkahana avatar Aug 31 '18 05:08 galkahana

I followed the examples in the link and did implement all the methods of IByteReaderWithPosition and IByteReader classes. In the examples FILE* operation is being used for getting all the necessary information in all the methods, but the data I have is of type unsigned char*. I am beginning to find that implementing the classes is not as straightforward as it might seem on the surface and couldn't find a way to solve my issue. Do you suggest anything at this point ? Is there any alternative way to bypass "implementing all the classes" and instead directly take unsigned char*

adithyakanchan avatar Sep 05 '18 11:09 adithyakanchan