I am converting bytes into an image but I get an error
Parameter is not valid
I am pasting my code. Kindly check the code and
In my case I got the error since my base64 string had wrong encoding before calling Image.FromStream. This worked for me in the end:
byte[] bytes = System.Convert.FromBase64String(base64ImageString);
using (MemoryStream ms = new MemoryStream(bytes))
{
var image = Image.FromStream(ms);
image.Save(filePath, System.Drawing.Imaging.ImageFormat.Png);
}