1/23/2024 0 Comments Make my logo a qr code![]() ![]() QrCodeWithLogoAndColor.SaveAsPng("ColorQrCodeWithLogo.png")Ĭolor colorForBarcode = new Color(51, 51, 153) // color from RGBĬolor annotationAboveBarcodeColor = new Color("#176feb") // color from Hexįont annotationAboveBarcodeFont = new Font("Candara", FontStyle.Bold, 15) Ĭolor barcodeValueBelowBarcodeColor = new Color("#6e53bb") įont barcodeValueBelowBarcodeFont = new Font("Cambria", FontStyle.Regular, 15) Private QrCodeWithLogoAndColor As GeneratedBarcode = QrCodeWithLogo.ChangeBarCodeColor(ColorFromRgb) Private QrCodeWithLogo As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("", logo, 250) Private ColorFromRgb As New (51, 51, 153) Private logo As New QRCodeLogo(qrlogo, 0, 0, 20F) Private qrlogo As AnyBitmap = AnyBitmap.FromFile("ironbarcode_top.webp") QrCodeWithLogoAndColor.SaveAsPng("ColorQrCodeWithLogo.png") Imports IronBarCode GeneratedBarcode QrCodeWithLogoAndColor = QrCodeWithLogo.ChangeBarCodeColor(ColorFromRgb) GeneratedBarcode QrCodeWithLogo = QRCodeWriter.CreateQrCodeWithLogo("", logo, 250) QRCodeLogo logo = new QRCodeLogo(qrlogo, 0, 0, 20f) :path=/static-assets/barcode/content-code-examples/how-to/customize-qr-code-style-logo-color.csĪnyBitmap qrlogo = AnyBitmap.FromFile("ironbarcode_top.webp") Let's look at the code snippet that demonstrates this feature and the resulting QR code we obtain from running this code. With our IronDrawing library, users can easily define their own colors using RGB values or Hex color codes and apply them to the QR code. Change Color of QR Code ExampleĪpart from the ability to add logo to your QR code, IronBarcode also enables users to further customize their QR code by changing its color. You have multiple export options, including image files, Streams, HTML and PDF. ![]() Use the default value 0 for square corners.įinally, to export the generated QR code, simply invoke a save method. Image Corners: Set the radius of the logo image's rounded corners.Use the value 0 to automatically determine the largest viable size. If the image is too large for the QR code to be readable, an exception will be thrown. Image Dimensions: Specify the desired width and height of the logo image in pixels.Importing Image: You can import images in multiple ways, such as from AnyBitmap, Stream, Byte Array, relative filepath, or URI.Here are the explanations for the required fields: To customize the logo, you need to fill in certain fields while creating a new QRCodeLogo object. We can see that the QR code features a logo in the center, with rounded edges. Let's examine the output QR code generated by the above code. Create Barcode from Text, URLs, IDs, Numbers & Binary Data. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |