查找图像是黑白图像还是RGB颜色VB.net [英] Find whether an image is black and white or RGB color VB.net

查看:84
本文介绍了查找图像是黑白图像还是RGB颜色VB.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何查找图像是灰度还是彩色VB.net.

谢谢,

Sivasankaran G

Hi,

how can i find whether an image is grayscale or color VB.net.

Thanks,

Sivasankaran G

推荐答案

色标过滤器 [ ^ ]本文可能是帮助您...
Color Scale Filter[^] this article could be help you...



查找图像的颜色非常简单.一旦找到图像的颜色,然后进行比较.比较后即可找到您的类型.
试试这个:
Hi,
It''s quite simple to find the color of the image. Once found the color of the image then compare that. You''ll find your type after comparing.
Try this:
Point pt=new Point(10,10);
Bitmap img = Image.FromFile("My File Path");
Color colorAtPoint = img.GetPixel(pt);
//Here you got the color of your image. Compare it with Grayscale



请参考 [



Refer this[^] also for the similar discussion.



--Amit


尝试一下,
它将对您有帮助.

Try this,
It will help you.

Dim btmp as Bitmap = Image.FromFile("Your File Path")
Dim clr as Color = btmp.GetPixel(New Point(100,0))



在这里,clr的颜色将为Point(100,0).您可以根据自己的意愿进行更改.
如果要在整个图像中进行比较,则可以使用for循环,只需更改点即可.

谢谢.



Here clr will have the color at the Point (100,0). You can change it as your wish.
If you want to compare it in the whole image then you can do it using for loop by just changing the point.

Thanks.


这篇关于查找图像是黑白图像还是RGB颜色VB.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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