I am working on universal windows app on Windows 10 SDK to draw rectangle on faces recognized in the image.
I am using Win2D to edit the pictures and draw rectangle on i
Try to access the file by the stream, not the path:
var photoFile = await KnownFolders.PicturesLibrary.CreateFileAsync("image2.jpg", CreationCollisionOption.ReplaceExisting);
if (photofile != null)
{
using (var stream = await photofile.OpenAsync(FileAccessMode.ReadWrite))
{
await offscreen.SaveAsync(stream, CanvasBitmapFileFormat.Jpeg);
}
}
In UWP if you access files via path, you will likely get Access Denied in many cases, it should be done via StorageFile.