Irene Tan

Irene Tan

  • NA
  • 23
  • 0

What is '? , :' mean??

Apr 15 2008 6:00 AM

Erm, i came across this codes. what does each of them means?

int pixelSize = (imageData.PixelFormat == PixelFormat.Format8bppIndexed) ? 1 : 3;

 

 

int srcOffset = sourceData.Stride - ((sourceData.PixelFormat == PixelFormat.Format8bppIndexed) ? width : width * 3);

 

 

(image.PixelFormat == PixelFormat.Format8bppIndexed) ?

PixelFormat.Format8bppIndexed : PixelFormat.Format24bppRgb);

 

 

for (int x = 0; x < lineSize; x++, ptr++, ovr++)

{

v = (int)*ptr - (int)*ovr;

*ptr = (v < 0) ? (byte)-v : (byte)v;
}

 

Thanks for your reply

 

 

 

 


Answers (1)