How to open .jpg
image in Windows Photo Viewer from C# app?
Not inside app like this code,
FileStream stream = new FileStream("test.png", FileMode.Open, FileAccess.Read); pictureBox1.Image = Image.FromStream(stream); stream.Close();
Assuming you upgraded to Windows 10 from a previous version of Windows, you should see Windows Photo Viewer as an option. Choose Windows Photo Viewer and exit the Settings menu, and you're done -- photos will now open up in Windows Photo Viewer.
Method 1: Set Windows Photo Viewer as Your Default Viewer To open any image file format with Windows Photo Viewer, right-click on any image file type, such as . bmp, . gif, . jpg, or .
The Photos app in Windows 10 gathers photos from your PC, phone, and other devices, and puts them in one place where you can more easily find what you're looking for. To get started, in the search box on the taskbar, type photos and then select the Photos app from the results. Or, press Open the Photos app in Windows.
I think you can just use:
Process.Start(@"C:\MyPicture.jpg");
And this will use the standard file viewer associated with .jpg files - by default the windows picture viewer.
Start it in a new Process
Process photoViewer = new Process(); photoViewer.StartInfo.FileName = @"The photo viewer file path"; photoViewer.StartInfo.Arguments = @"Your image file path"; photoViewer.Start();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With