title: A generic error occurred in GDI+ Drawings.AddPicture using EPPlus
body: <p>I want to add a picture in Excel. I use the library EPPLus. It is necessary to obtain an image of the BASE64 format and inserted into the cell in Excel</p>
  
  <p>My Code: </p>
  
  <pre><code>using (System.Drawing.Image img = Base64ToImage(base64String))
                              {
                               ExcelPicture excelImage = null;
                                  if (img != null)
                                  {
                ERROR HERE         excelImage = worksheet.Drawings.AddPicture("Title", img);
                                   excelImage.From.Column = 1;
                                   excelImage.From.Row = 1;
                                   excelImage.SetSize(100, 100);
                                  }
                              }
  
  
  public Image Base64ToImage(string base64String)
      {
          // Convert base 64 string to byte[]
          byte[] imageBytes = Convert.FromBase64String(base64String);
          // Convert byte[] to Image
          using (var ms = new MemoryStream(imageBytes, 0, imageBytes.Length))
          {
              Image image = Image.FromStream(ms, true);
              return image;
          }
      }
  </code></pre>