Image.Save() throws exception “Value cannot be null./r/nParameter name: encoder”

If you load an image from disk, you can use image.RawFormat to save that image using its original format. However there is no encoder associated with an in-memory bitmap (which is what you are creating in this sample application), so you’ll have to specify an image format yourself (ie. ImageFormat.Bmp).

Leave a Comment