下面是引用cmovies於2006-04-22 23:13發表的 :
index+"xxx"跟ScanLine
-> 就是指向這個 Row 中的第 Index 點的哪個顏色 R G B
一般要做影像處理都會直接對影像資料作運算後再存回去
ScanLine 就能提供影像資料內容的位址供程式加以運算處理
不好意思~
想再請問一下~
如果不做存回去的動作~在下的程式碼應該怎麼改?
//////////////////////////////////////////////////////////////
ptr[index + BLUE ] = (Byte)gray;
ptr[index + GREEN ] = (Byte)gray;
ptr[index + RED ] = (Byte)gray;
index += 3;//////////////////////////////////////////////////////////////
ptr = (Byte*) image->Picture->Bitmap->
ScanLine[row];
//////////////////////////////////////////////////////////////