Image.Save: Value cannot be null. Parameter name: encoder
Calling image.Save on a .NET Image may fail with the following exception:
> Value cannot be null. Parameter name: encoder
There are many reasons for this, but it could be due to the second argument not working.
For example, if you call img.RotateFlip, it wipes out the RawFormat of the image.
So, make sure you either pass a valid format, such as BMP, or you cache the format prior to calling RotateFlip:
var imageFormat = myImage.RawFormat;
Created By: amos 9/24/2013 6:18:32 PM