获取使用C#和.NET环境JPEG图像的分辨率是多少? [英] Get the resolution of a jpeg image using C# and the .NET Environment?

查看:180
本文介绍了获取使用C#和.NET环境JPEG图像的分辨率是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的客户将上传图片印在他们的文件,我们一直要求拿出一个办法来获取图像的分辨率,以警告他们如果图像具有过低的分辨率,并期待pixalated在最终产品

Our clients will be uploading images to be printed on their documents and we have been asked to come up with a way to get the resolution of the image in order to warn them if the image has too low of a resolution and will look pixalated in the end-product

如果涉及到它,我们也可以去的尺寸如果有谁知道如何获得这些,但该决议将是preferred

If it comes to it we could also go with the dimensions if anyone knows how to get those but the resolution would be preferred

感谢您

推荐答案

<一个href="http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx">System.Drawing.Image

Image newImage = Image.FromFile("SampImag.jpg");
newImage.HorizontalResolution

这篇关于获取使用C#和.NET环境JPEG图像的分辨率是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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