How to make a barcode in an image editor
Filter > Render > Barcode in Paint by Zaweba draws EAN-13 and Code 128 barcodes as pixels on a layer, ready to place on a label or package design.

Barcodes can be made right inside Paint by Zaweba. Choose Filter > Render > Barcode, pick EAN-13 or Code 128, enter the number or text, and the barcode is drawn as pixels onto the current layer. It works offline, so you can add a code to a label, a package mock up or a shelf card without leaving the editor.
The two types cover different jobs. EAN-13 is the 13 digit barcode printed on retail products in shops across much of the world. Code 128 holds letters and numbers and is common on shipping labels, stock tags and internal tracking. Pick the one your scanner, shop or warehouse expects.
What you need
The number or text, and Paint by Zaweba on Windows. For EAN-13 on goods sold in shops, the number usually has to come from the body that issues product codes in your country, so use the number you've been given rather than making one up. For your own stock labels, Code 128 can hold whatever reference you like.
Step by step
Add a new empty layer so the barcode stays separate from the design. Fill the area behind it with white if your design has a coloured background, because scanners read dark bars on a light ground best.
Choose Filter > Render > Barcode. Choose EAN-13 or Code 128 and type the content. Apply it, and the bars appear on the layer.
Move the layer into place. If it's the wrong size, think before scaling, as explained below.
Size and sharpness
The barcode is pixels, not a shape layer, so it's best made at its final size. Scanners rely on the precise widths of bars and gaps, and resampling can blur them. If you must resize, use whole number scales with hard edged resampling, which keeps the bars crisp and their widths in proportion. Avoid odd percentages, which can make some bars a pixel wider than others.
Think about print resolution as well. A barcode that looks fine on screen can print soft if the document's resolution is too low for its printed size. Work at the resolution your printer expects from the start.
Placement
Leave a clear margin on both sides of the bars, often called the quiet zone. Don't run text, borders or pictures into it. Keep the bars horizontal on flat surfaces, and on round packaging such as a bottle, think about how the bars will curve.
Contrast matters more than colour. Black on white is safest. Dark blue or dark green on white usually works too. Red bars, or any bars on a dark background, are likely to fail.
Testing
Print a test copy at the real size and scan it with the kind of scanner that will actually be used. A phone app is a useful first check, but a till or warehouse scanner is the real test.
Other options
Paint by Zaweba's Filter > Render menu also has a QR code generator for links and longer text. If you produce a lot of labels with codes and text, a dedicated labelling tool may suit that job better. For one barcode in a design you're already working on, the filter does the job in seconds.