I'm trying to read into a System.Drawing.Image
structure a PDF file from a local path.
I used Image.fromPath(string fileName)
- and it thrown me an exception:
Out of memory.
I read the documentation, and I understood that that this exception can be thrown in one of two cases -
The file does not have a valid image format.
-or-
GDI+ does not support the pixel format of the file.
My question is - which one is it, and how can I read the image despite this?
Note: Eventually, the image becomes a System.IO.Stream
- if you can convert the PDF into this structure, it will help me just as much.