private async void CameraButton_Clicked(object sender, EventArgs e) { var photo = await Plugin.Media.CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions() { CompressionQuality = 50 }); decimal receiptTotal = OCRProgram.TextExtraction(photo.GetStream()); //if (photo != null) //PhotoImage.Source = ImageSource.FromStream(() => { return photo.GetStream(); }); }
private async void CameraButton_Clicked(object sender, EventArgs e) { var photo = await Plugin.Media.CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions() { CompressionQuality = 80 }); if (photo != null) { decimal receiptTotal = OCRProgram.TextExtraction(photo.GetStream()); // Sets the Expense text field to the total grabbed by the OCR ExpenseTotal.Text = receiptTotal.ToString(); } }