The image you linked has vertical lines which are two pixels wide.
If you scan the whole .png:
public static void main(String[] args) throws IOException {
BufferedImage barcodeImage = ImageIO.read(new File("src/barcode1.png"));
int middle = barcodeImage.getHeight()/2;
for (int i = 0; i < barcodeImage.getWidth(); i++) {
System.out.println(barcodeImage.getRGB(i, middle));
}
}
you can see the pixels are w,w,w,w,w,b,b,w,w,b,b,w,w,w,w,b,b,b,b... etc.