如何在C#中检查图像质量 [英] How to check image quality in C#

查看:64
本文介绍了如何在C#中检查图像质量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个应用程序,我需要检查用户上传的图像质量,以便我可以检查c#中的图像质量。当我说图像质量意味着模糊图像时,图像ppi是否高?上传的图像比图片大小要多吗?



我尝试过:



我做的基本验证就像图像宽度,高度是我需要的。

解决方案

尺寸很简单,dpi很容易 - 你可以得到两者将图像加载到Bitmap对象后:

Image.Height Property(System.Drawing) [ ^ ]

Image.Width属性(System.Drawing) [ ^ ]

Image.VerticalResolution Property(System.Drawing) [ ^ ]

Image.Horizo​​ntalResolution Property(System.Drawing) [ ^ ]

有多模糊?更加努力!

见这里: c# - 如何识别/检查模糊图像? - 堆栈溢出 [ ^ ]

I am creating one application where i need to check the user uploaded image quality so how i can check the image quality in c#. When i say image quality means blur image or not, image ppi is high or not? Uploaded image is more then the image required size?

What I have tried:

The basic validation i have done like image width, height is more then i need.

解决方案

Size is easy, dpi is easy - you can get both from the Bitmap object once you load the Image into it:
Image.Height Property (System.Drawing)[^]
Image.Width Property (System.Drawing)[^]
Image.VerticalResolution Property (System.Drawing)[^]
Image.HorizontalResolution Property (System.Drawing)[^]
How blurred is it? Loads harder!
See here: c# - How to identify/check blur image? - Stack Overflow[^]


这篇关于如何在C#中检查图像质量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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