I am trying to save an image using System.Drawing.Save () and I continue to get an Invalid Parameter exception.
Can someone please take a look at my code and tell me what I'm doing wrong.
Here is the code that generates the barcode image.
public class BarcodeHelper { Font barcodeFont; public BarcodeHelper() { PrivateFontCollection fonts; FontFamily family = LoadFontFamily("~/../fonts/Code128bWin.ttf", out fonts); barcodeFont = new Font(family, 20.0f);
Here I call the code to create and save the barcode image. I get an exception when calling the Save () method.
System.Drawing.Image img = barcodeHelper.GenerateBarcode("2lgbub51aj+01000002"); img.Save("~/images/barcode.png");

source share