Home > Software engineering >  Program error, how to extract the BitmapData pixel processing?
Program error, how to extract the BitmapData pixel processing?

Time:11-02

Private BitmapData CreateLighterShadesOfGray (BitmapData pixelData)
{
Int32 the depth;
Int32 loThreashold=0;
Int32 hiThreshold=3500;
Short [] enhPixelData=https://bbs.csdn.net/topics/new short [pixelData. Width * pixelData. Height];
for (int i=0; I & lt; * pixelData pixelData. Height. The Width; I++)
{
The depth=pixelData [I] & gt;> DepthImageFrame. PlayerIndexBitmaskWidth;
If (the depth & lt; LoThreashold | | the depth & gt; HiThreshold)
{
EnhPixelData [I]=0 XFF;
}
The else
{
EnhPixelData [I]=(short) ~ pixelData [I];
}


}
Var a=new BitmapData ();
A.S can0=(IntPtr) enhPixelData. ToArray (). The SyncRoot;
return a;
}
In this program pixelData error severity: [I] CS0021 always apply indexing with [] to an expression of type 'BitmapData'
My small white, you great god answers

CodePudding user response:

This is not a C/C + + syntax

CodePudding user response:

VS IDE, in don't understand the symbol BitmapData point on the right mouse button, choose to define,
  • Related