You can do that but the logo image will override the underlying barcode. See the sample code segment for your reference, you got to make the logo (image) with transparent background:
e.g., Sample code:
// Create a new empty image with height width of the barcode
Bitmap output = new Bitmap(barcode.Width, barcode.Height);
// Get the Graphics object
using (Graphics g = Graphics.FromImage(output))
{
// Clear the canvas
g.Clear(Color.White);
// Draw the primary image (barcode image) on the canvas
g.DrawImage(barcode, new PointF(0, 0));
// Draw the second image (logo image) on the canvas inside the barcode image
g.DrawImage(picture, new PointF((int)((barcode.Width - picture.Width) / 2), (int)((barcode.Height - picture.Height) / 2)));
}
...
As a follow on, it appears that we can set up to 30% error correction to a QR Code as outlined within this document. It could be used to allow for a small image to be added to the centre of the QR Code.
You should know that QR does not support data wiping because we cannot detect wiping position. Because the error correction in most of 2D barcodes is based on Reed–Solomon error correction you need 2X error correction words to correct one incorrect word (QR code uses standard byte as barcode word). In this way event with highest QRErrorLevel.LevelH which adds 30% error correction words you can correct only 15% of incorrect words (the error location and correction are processed automatically by Galois finite fields magic).
To avoid low readability of you barcode on printed images you should cover by logo not more than 2-5% of barcode area (this depends on QRErrorLevel).
1 Like
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.