If you are using the .NET Image.Save() method to save an image, and you receive an ArgumentException with the message "Parameter is not valid," you probably spent a while examining the parameters you were passing into the Save() call, right? You probably banged your head against the wall and said, "Dear GOD, please tell me WHICH PARAMETER is not valid!"
Unfortunately, the error message is completely unhelpful, and you are seeing it because you had a brain fart. You have called Dispose() on the image object before you tried to Save() it.
If this helps you, please comment on this post, thanks.
Wednesday, November 14, 2007
System.Drawing.Image.Save() results in ArgumentException: "Parameter is not valid"
Posted by Thomas at 11/14/2007 08:37:00 AM
Labels: dotnet, Image.Save(), System.Drawing
Subscribe to:
Post Comments (Atom)
7 comments:
i absolutely have not it's a brand new object and it still throws that exception on a specific image format or something
THANKS A MILLION... IT REALLY WORKS.
Yep it worked. Now I get "A generic error occurred in GDI+"
...sigh
thank you :)
Thanks!
Thank you, yes, forgotten about the dispose.
I love you so much for this - thanks!
Post a Comment