Wednesday, February 13, 2013

Parameter is not valid - System.Drawing.Image.FromStream

Two cases when you get this error:
1. When the stream is of 0 length or null
2. When the stream you are trying to save as image is not actually an image, like for eg: I have the stream of a pdf file received from a service and I am trying to convert this to an image.

 

No comments:

Post a Comment