Access denied while saving image in UWP.Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
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 it. I am able to read files from the Pictures library but when I try to save the image after editing it gives the following error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) The following is the method I used to draw rectangle on the image: private async void DrawRect() { CanvasDevice device = CanvasDevice.GetSharedDevice(); CanvasBitmap bitmap = null; CanvasRenderTarget offscreen = null; Windows