title: Formatting EAN8 with zxing/barcode4j
body: <p>I am trying to generate an EAN8-barcode in java. If tried barcode4j (which is free in contrary to the barcodelib), which gives me really good results. </p>
  
  <p>One thing I haven't figured out is to change the width and the height of the barcode in barocde4j. I have solved it by the resolution parameter, which isn't imho that good solution.</p>
  
  <p>What i wanna do is generating everthing in zxing (because i also need  QR code), but the result look quite ugly. This is how i generate the barcode:</p>
  
  <pre><code>BitMatrix matrix;
  com.google.zxing.Writer writer = new EAN8Writer();
  com.google.zxing.BarcodeFormat BarcodeFormat;
  matrix = writer.encode(code,BarcodeFormat, width, height);
  MatrixToImageWriter.writeToStream(matrix, "JPG", output);
  </code></pre>
  
  <p>Picture looks with zxing like</p>
  
  <p><img src="https://i.stack.imgur.com/Yjmai.jpg" alt="zxing"></p>
  
  <p>But i wish it would look like barcode4j does it:</p>
  
  <p><img src="https://i.stack.imgur.com/aXLUv.jpg" alt="barcode4j"></p>
  
  <p>regards &amp;&amp; tia
    noircc</p>