0

I have read and tried the solutions, but the problem is not solved. I get an gdi+ ​​error while saving a image.

            byte[] bytes1 = Convert.FromBase64String(t1);

            var randomFileName = Guid.NewGuid().ToString().Substring(0, 4) + ".png";
            var path1 = Path.Combine(Directory.GetCurrentDirectory(), "Content", "images", "16x9", randomFileName);

            using (MemoryStream ms1 = new MemoryStream(bytes1))
            {
                System.Drawing.Image image1 = System.Drawing.Image.FromStream(ms1);
                image1.Save(path1);
            }
emeksc1
  • 43
  • 9

0 Answers0