title: Display only the QR image created with phonegap Barcodescanner Zxing based Plugin
body: <p>I am using the phonegap barcodescanner plugin from <a href="https://github.com/wildabeast/BarcodeScanner" rel="nofollow">https://github.com/wildabeast/BarcodeScanner</a></p>
  
  <p>I am encoding a text string and would like to display only the generated image. Right now I'm using the following code </p>
  
  <pre><code>window.plugins.barcodeScanner.encode(
              "TEXT_TYPE",
              strToEncode,
              function(success) {
                  console.log("Encoding succeeded");
                  alert("Encode success: " + success);
              },                 
              function(fail) {
                  console.log("Encoding failed");
                  alert("Encode failed: " + fail);
              }
          );
  </code></pre>
  
  <p>The success object in the alert returns a image with the encoded text below it. I would like to instead get and show only an image object from the result. Is there such a function like <strong>success.toBitmap</strong> or something like that? Or is there an alternative way I could do it?</p>
  
  <p>N.B. I'm actually using this in an Oracle MAF application, so if there are some MAF specific answers it would be great too. Code is as below</p>
  
  <pre><code>&lt;amx:verbatim id="v1"&gt;
       &lt;![CDATA[
      &lt;script type="text/javascript" src="js/barcodescanner.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
  
      function generateBarcodeFromJavaBean(strToEncode) {
          console.log("Entering generateBarcodeFromJavaBean");
          window.plugins.barcodeScanner.encode(
              "TEXT_TYPE",
              strToEncode,
              function(success) {
                  console.log("Encoding succeeded");
                  alert("Encode success: " + success);
              },                 
              function(fail) {
                  console.log("Encoding failed");
                  alert("Encode failed: " + fail);
              }
          );
      }
  
      &lt;/script&gt;
  ]]&gt;
  &lt;/amx:verbatim&gt;
  </code></pre>