title: Nativescript : camera photo asset with nativescript-ocr
body: <p>I'm trying to take a picture with the nativescript camera module and to run 
  the nativescript-ocr module (<a href="https://github.com/EddyVerbruggen/nativescript-ocr" rel="nofollow noreferrer">https://github.com/EddyVerbruggen/nativescript-ocr</a>)  on it . </p>
  
  <p>Here is my code :</p>
  
  <pre><code>public saveToGallery: boolean = true;
  public keepAspectRatio: boolean = true;
  public width: number = 300;
  public height: number = 300;
  private ocr: OCR;
  
  constructor() {
      this.ocr = new OCR();
  
  }
  
  ngOnInit(): void { 
  }
  
  
  onTakePhoto() {
      let options = {
          width: this.width,
          height: this.height,
          keepAspectRatio: this.keepAspectRatio,
          saveToGallery: this.saveToGallery
      };
      takePicture(options).
          then((imageAsset) =&gt; {
              console.log("Result is an image asset instance");
  
              let img: ImageSource = new ImageSource();
  
              img.fromAsset(imageAsset).then((success) =&gt; {
                  if (success) {
                      this.ocr.retrieveText({
                          image: img,
                          whitelist: "ABCDEF",
                          blacklist: "0123456789",
                          onProgress: (percentage: number) =&gt; {
                              console.log(`Decoding progress: ${percentage}%`);
                          }
                      }).then(
                          (result: RetrieveTextResult) =&gt; {
  
                              console.log(`Result: ${result.text}`);
                          }, (error: string) =&gt; {
                              console.log(`Error: ${error}`);
                          })
                  }
              });
          }).catch((err) =&gt; {
              console.log("Error -&gt; " + err.message);
          });
  }
  
  onRequestPermissions() {
      requestPermissions();
  }
  }
  </code></pre>
  
  <p>Camera plugin works fine, takes and saves a picture, but when i'm running onTakePhoto i get this error message :</p>
  
  <p>"Error in ocr.retrieveText: Error: java.lang.IllegalArgumentException: Data path does not exist!"</p>
  
  <p>i'm not sure to use the .fromAsset the right way,
  but i try a lot of thing to solve this problem </p>
  
  <p>what i'm doing wrong?</p>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <blockquote>
          <blockquote>
            <blockquote>
              <blockquote>
                <p>Resolve : i didn't create corectly my tesseract/tessdata folder</p>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
  </blockquote>