File reading strange output


#1

Hi guys,

import { File } from '@ionic-native/file';

Then I am doing this:

 plt.ready()
          .then(() => {
            this.file.checkFile('file:///sdcard/pbr/', 'cropped.png').then((res) => {
              const imageData = this.file.readAsDataURL('file:///sdcard/pbr/', 'cropped.png');
                debugger
              this.vision.getLabels(imageData).subscribe((result) => {
                this.loading.dismiss();
                this.saveResults(imageData, result.json().responses);
                debugger
              }, err => {
                console.log(err);
                this.toastMe(err);
                this.loading.dismiss();
              });
            })
        })

Here is my constructor:

constructor(
    private vision: GoogleCloudVisionServiceProvider, 
    private file: File,
    public plt: Platform
  )

Please note that I am doing this so I can do some test it is not the production code. Now I have attached the result that imageData returns a very odd return. It is running on the Actual device.

14 pm