Last active
September 10, 2021 09:59
Rotate Barcode Image in C#: https://kb.aspose.com/barcode/net/how-to-rotate-barcode-image-in-c-sharp/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
//Use following namespaces to rotate barcode image | |
using Aspose.BarCode; | |
using Aspose.BarCode.Generation; | |
namespace RotateBarCodeImage | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Set license before rotating barcode image | |
Aspose.BarCode.License AsposeBarCodeLicense = new Aspose.BarCode.License(); | |
AsposeBarCodeLicense.SetLicense(@"c:\asposelicense\license.lic"); | |
//initiate barcode generator object with Code128 encode type | |
BarcodeGenerator RotateBarCodeImage = new BarcodeGenerator(EncodeTypes.Code128); | |
RotateBarCodeImage.CodeText = "Product Code 123"; | |
//set rotation of the barcode | |
RotateBarCodeImage.Parameters.RotationAngle = 45; | |
//save rotated barcode image as PNG | |
RotateBarCodeImage.Save("Rotated_BarCode_Image.png", BarCodeImageFormat.Png); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment