在Windows照片查看器打开的图像 [英] Open image in Windows Photo Viewer

查看:757
本文介绍了在Windows照片查看器打开的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows照片查看器从C#应用程序打开 .JPG 形象?



里面没有应用这样的代码,

 的FileStream流=新的FileStream(test.png,FileMode.Open,FileAccess.Read); 
pictureBox1.Image = Image.FromStream(流);
stream.Close();


解决方案

在新的工艺

 工艺photoViewer =新工艺(); 
photoViewer.StartInfo.FileName = @照片查看器中的文件路径;
photoViewer.StartInfo.Arguments = @你的映像文件的路径;
photoViewer.Start();


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();

解决方案

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();

这篇关于在Windows照片查看器打开的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆