There are a few things to keep in mind when scaling a barcode.
1) You get the absolute coolest edges of the barcode if each module (the narrowest strip) has an integer number of pixels wide.
2) If the module width is not equal to an integer number of pixels, create a barcode with a truncated pixel width and use bilinear interpolation to zoom in. This will give you no more than one pixel of gradient along the edges.
3) Be careful when purchasing a barcode library, choose one that includes built-in scaling with saving a barcode, for example, this or this . Barcodes have special requirements that are not usually found in image processing, such as pixel perfection. Using, for example, Gimp can damage the barcode.
source share