宣告多條SCANLINE要怎麼寫??? |
尚未結案
|
penny015
一般會員 發表:20 回覆:15 積分:7 註冊:2005-03-25 發送簡訊給我 |
|
fusung
中階會員 發表:26 回覆:169 積分:99 註冊:2003-11-25 發送簡訊給我 |
哈囉,penny015 你可以宣告一個大小為50的矩陣來儲存,試試看吧。 < class="code">
Byte *ptr[50]; for (int y = 0; y < 50; y++)
ptr[y] = (Byte *)pBitmap->ScanLine[y];
/*
The first step toward proving things for yourself is to understand how others have done it before!
*/
------
The first step toward proving things for yourself is to understand how others have done it before! |
暗黑破壞神
版主 發表:9 回覆:2301 積分:1627 註冊:2004-10-04 發送簡訊給我 |
|
richtop
資深會員 發表:122 回覆:646 積分:468 註冊:2003-06-10 發送簡訊給我 |
penny015 您好: fusung 大大應該算回答了您的問題了! 您是不是希望像存取二維陣列那樣來處理影像呢?
底下有我之前寫過以二維方式處理彩色轉灰階的程式碼,您參考看看!
< class="code">
void to2D(TImage *image)
{ Byte **ptr;
int r, g, b, gray, index; image->Picture->Bitmap->PixelFormat = pf24bit;
ptr = new Byte*[image->Picture->Height];
for (int k=0; k
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |