对'MarshalByRefObject'类型的引用声称它在'mscorlib'中定义,但无法找到它。 [英] Reference to type 'MarshalByRefObject' claims it is defined in 'mscorlib', but it could not be found.
本文介绍了对'MarshalByRefObject'类型的引用声称它在'mscorlib'中定义,但无法找到它。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用visual studio 2015开发一个Windows通用应用程序。但是当我尝试在System.drawing.Imaging中使用GetPixel时,我遇到了错误。我找不到解决这个问题的方法。任何人遇到同样的问题并有解决方案吗?
提前致谢!
彩色图像;
float [,] imagegray = new float [image.Width,image.Height];
for ( int i = 0 ; i < image.Width; i ++)
{
for ( int j = 0 ; j < image.Height; j ++)
{
imagecolor = image.GetPixel(i,j);
imagegray [i,j] = 0 .299f * imagecolor.R + 0 .587f * imagecolor.G + 0 .114f * imagecolor.B;
}
}
解决方案
您需要浏览并添加.NET程序集的参考吗?
这是在System.Drawing
参考:
https://msdn.microsoft.com/en-us/library/system.marshalbyrefobject(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/system.drawing.bitmap.getpixel(v=vs.110).aspx
http: //stackoverflow.com/questions/16390148/getpixel-method-is-not-found
I'm working on a windows universal app with visual studio 2015. But I meet the error when I tried to use GetPixel in System.drawing.Imaging. I can't find the solution for this problem. Anyone has met the same problem and have a solution?
Thanks in advance!
Color imagecolor;
float[,] imagegray = new float[image.Width, image.Height];
for (int i = 0; i < image.Width; i++)
{
for (int j = 0; j < image.Height; j++)
{
imagecolor = image.GetPixel(i, j);
imagegray[i, j] = 0.299f * imagecolor.R + 0.587f * imagecolor.G + 0.114f * imagecolor.B;
}
}
解决方案
You need to browse and add refrence from .NET assemblies?
It is in System.Drawing
Refer :
https://msdn.microsoft.com/en-us/library/system.marshalbyrefobject(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/system.drawing.bitmap.getpixel(v=vs.110).aspx
http://stackoverflow.com/questions/16390148/getpixel-method-is-not-found
这篇关于对'MarshalByRefObject'类型的引用声称它在'mscorlib'中定义,但无法找到它。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文