简体   繁体   English

如何在C#中获取BMP图像特定区域的颜色?

[英]How to get colors of particular area of a BMP image in c#?

I want to get the colors of the center bottom part of a BMP image. 我想获取BMP图像底部中央的颜色。 How this can be done, I need some techniques. 如何做到这一点,我需要一些技巧。

Check out the Bitmap class. 签出Bitmap类。 It has a GetPixel() method which takes X/Y coordinates and returns the color of that pixel. 它具有GetPixel()方法,该方法获取X / Y坐标并返回该像素的颜色。

http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.getpixel%28v=VS.100%29.aspx http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.getpixel%28v=VS.100%29.aspx

If this isn't enough, you'll have to describe more of what you are trying to accomplish. 如果这还不够,那么您将不得不描述您想要完成的更多事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM