diff --git a/Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels/Generate-Barcode-labels.csproj b/Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels/Generate-Barcode-labels.csproj index d234ca8..f67718d 100644 --- a/Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels/Generate-Barcode-labels.csproj +++ b/Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels/Generate-Barcode-labels.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1 + net8.0 Generate_Barcode_labels diff --git a/Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels/Program.cs b/Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels/Program.cs index ca2c769..3a08545 100644 --- a/Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels/Program.cs +++ b/Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels/Program.cs @@ -4,8 +4,6 @@ using Syncfusion.Pdf.Graphics; using System; using System.Data; -using System.Drawing; -using System.Drawing.Imaging; using System.IO; namespace Generate_Barcode_labels @@ -58,11 +56,8 @@ private static Stream GenerateBarcodeImage(string barcodeText) barcode.BarHeight = 45; barcode.Text = barcodeText; //Convert the barcode to image - Image barcodeImage = barcode.ToImage(new System.Drawing.SizeF(145, 45)); - //Converts image to stream - MemoryStream stream = new MemoryStream(); - barcodeImage.Save(stream, ImageFormat.Png); - return stream; + Stream imageStream = barcode.ToImage(new Syncfusion.Drawing.SizeF(145, 45)); + return imageStream; } ///