I asked you to provide a link to the original image e.g. .JPG or .PNG or .GIF
I also asked you for the style of Barcode.
I had to do some detective work on your code.
static const unsigned char PROGMEM label [] = {
0X00,0X01,0XC8,0X00,0XAA,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
...
actually means
static const unsigned char PROGMEM label [] = {
0X00,0X01,0XC8,0X00,0XAA,0X00, // width = 200, height = 170
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
...
So you should comment out the size information.
static const unsigned char PROGMEM label [] = {
// 0X00,0X01,0XC8,0X00,0XAA,0X00, //comment out the size information
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
...
tft.drawBitmap(30,50,label,200,170,WHITE); //use correct width and height
...
It "looks" like an EAN-13 barcode. Do you want to use EAN-13 barcodes?
Your label1[ ] data is not in the ZIP file. So I could only display the 9_501101_530003 barcode in label[ ]
Please answer our questions carefully.
Do you want to generate an EAN-13 barcode from any number?
Or just display an EAN-13 barcode from an image that you know at compile-time?
David.
Edit. The data in label[ ] appears to have come from a "resized" image. The guard lines should be equal width. When you resize an anti-aliased image into a monochrome image of a different size the line widths do not always make a perfect match.
You should make the guard lines one-pixel width. And all the other lines should be multiples of the guard line width.
Or you need to do anti-aliasing on the TFT.