当前位置: 首页>>代码示例>>C#>>正文


C# IBitmap.GetPixel方法代码示例

本文整理汇总了C#中IBitmap.GetPixel方法的典型用法代码示例。如果您正苦于以下问题:C# IBitmap.GetPixel方法的具体用法?C# IBitmap.GetPixel怎么用?C# IBitmap.GetPixel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IBitmap的用法示例。


在下文中一共展示了IBitmap.GetPixel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RGBLuminanceSource

 public RGBLuminanceSource(IBitmap d, int W, int H)
     : base(W, H) {
     int width = __width = W;
     int height = __height = H;
     // In order to measure pure decoding speed, we convert the entire image to a greyscale array
     // up front, which is the same as the Y channel of the YUVLuminanceSource in the real app.
     luminances = new sbyte[width * height];
     //if (format == PixelFormat.Format8bppIndexed)
     {
         Color c;
         for (int y = 0; y < height; y++) {
             int offset = y * width;
             for (int x = 0; x < width; x++) {
                 c = d.GetPixel(x, y);
                 luminances[offset + x] = (sbyte)(((int)c.R) << 16 | ((int)c.G) << 8 | ((int)c.B));
             }
         }
     }
 }
开发者ID:DozenArts,项目名称:zxing.MonoTouch,代码行数:19,代码来源:RGBLuminanceSource.cs

示例2: manipulateImage

		private void manipulateImage(IBitmap bitmap, ILoadImageConfig config)
		{
			if (config == null) return;
			if (config.TransparentColorSamplePoint != null)
			{
				Color transparentColor = bitmap.GetPixel((int)config.TransparentColorSamplePoint.Value.X,
					(int)config.TransparentColorSamplePoint.Value.Y);
				bitmap.MakeTransparent(transparentColor);
			}
		}
开发者ID:tzachshabtay,项目名称:MonoAGS,代码行数:10,代码来源:GLGraphicsFactory.cs


注:本文中的IBitmap.GetPixel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。