title: Trouble generating Barcode using ZXing library with large data
body: <p>I need to generate barcode in 128A format with data: 900000588548001100001305000000000207201512345.6|12345.7</p>
  
  <p>I'm using ZXing library and Here is my method:</p>
  
  <pre><code>private void barcodeGenerator(String data)
  {
      try
      {
          com.google.zxing.MultiFormatWriter writer = new MultiFormatWriter();
  
          BitMatrix bm = writer.encode(data, BarcodeFormat.CODE_128, 700, 200);
          Bitmap ImageBitmap = Bitmap.createBitmap(700, 200, Config.ARGB_8888);
  
          for (int i = 0; i &lt; 700; i++)
          {//width
              for (int j = 0; j &lt; 200; j++)
              {//height
                  ImageBitmap.setPixel(i, j, bm.get(i, j) ? Color.BLACK : Color.WHITE);
              }
          }
  
          File f = new File(Environment.getExternalStorageDirectory() + "/barcode1.png");
  
  
          FileOutputStream fos = new FileOutputStream(f);
          ImageBitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
      }
      catch(Exception e)
      {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>This method generates and stores the barcode image in SDCard which m scanning using ZXing Barcode Scanner.</p>
  
  <p>Barcode is successfully scanned when data is small. eg: 123.4|456.7</p>
  
  <p><img src="https://i.stack.imgur.com/Pla7s.png" alt="enter image description here"></p>
  
  <p>But if data is large, eg: 900000588548001100001305000000000207201512345.6|12345.7</p>
  
  <p>It looks like some wrong barcode is generated and Scanner is not able to scan the generated barcode.</p>
  
  <p><img src="https://i.stack.imgur.com/HPpe5.png" alt="enter image description here"></p>
  
  <p>Thanks in advance for help.</p>
  
  <p>Edit: Have added generated barcode images</p>