Beispiel #1
0
        private async void UploadPic_Click(object sender, EventArgs e)
        {
            //if the app is there load it
            Bitmap bitmap = await GetImage();

            OCRmageView.SetImageBitmap(bitmap);

            BitmapOperations.SendImageForOCR(AppPath.smallfilePath());



            ResultText.Text = BitmapOperations.ResultTextFromOCR;
        }
Beispiel #2
0
        //the result of the StartActivityForResult
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            // Make it available in the gallery by adding it to the media database

            Intent mediaScanIntent = new Intent(Intent.ActionMediaScannerScanFile);

            AppPath.OCRfile = new File(AppPath.bigfilePath());
            Uri contentUri = Uri.FromFile(AppPath.OCRfile);

            mediaScanIntent.SetData(contentUri);
            SendBroadcast(mediaScanIntent); //tell everything about the new pic?


            BitmapOperations.SaveSmallBitmapAsJPG();
        }