1
Reply

What is '? , :' mean??

Irene Tan

Irene Tan

Apr 15 2008 6:00 AM
3.1k

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

 

 

 

 


Upload Source Code  Select only zip and rar file.
Answers (1)