PDF-Writer
PDF-Writer copied to clipboard
Reading image from memory
Do we have a function for reading an image from memory?
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.
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*