byte[] buffer = System.IO.File.ReadAllBytes("");//provide the path of the .PNG in the ("please help me find the path")
using System; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using NativeMedia; using Xamarin.Essentials; using Xamarin.Forms; namespace UploadingFiles { public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); } private async void DoPDFThings(object sender, EventArgs e) { var screenshot = await Screenshot.CaptureAsync(); await MediaGallery.SaveAsync(MediaFileType.Image, await screenshot.OpenReadAsync(), "myScreenshot.png"); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)