線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:818
推到 Plurk!
推到 Facebook!

再次麻煩各位大大 ....

缺席
seiken
一般會員


發表:9
回覆:29
積分:7
註冊:2008-11-21

發送簡訊給我
#1 引用回覆 回覆 發表時間:2008-12-04 20:01:05 IP:123.110.xxx.xxx 訂閱
這是小弟寫的程式 有幾個問題想請問一下 請各位大大幫我 解決我的疑問
{
Graphics::TBitmap *Bmap,*Bmap1, *Bmap2,*Bmap3;
Bmap = new Graphics::TBitmap();
Bmap1 = new Graphics::TBitmap();
Bmap2 = new Graphics::TBitmap();
Bmap3 = new Graphics::TBitmap();
int w=Image4->Width;
int h=Image4->Height;
Bmap1 = Image1->Picture->Bitmap; <------1.我將各圖都指定一個Bmap暫存進Bitmap裡 這動作宣一次Bitmap的內容是不是就會改一次
Bmap1->PixelFormat = pf24bit;
Bmap1->Width = Image1->Picture->Width;
Bmap1->Height =Image1->Picture->Height;
Bmap2 =Image2->Picture->Bitmap;
Bmap2->PixelFormat = pf24bit;
Bmap2->Width = Image2->Picture->Width;
Bmap2->Height =Image2->Picture->Height;
Bmap3 =Image3->Picture->Bitmap; <------2.暫存進Bitmap裡的圖有辨法能讓它做排列嗎 ?
Bmap3->PixelFormat = pf24bit;
Bmap3->Width = Image3->Picture->Width;
Bmap3->Height = Image3->Picture->Height;
Bmap = <------ 這要怎麼宣告才能看見Bmap1 2 3 的圖
Bmap->PixelFormat = pf24bit;
Bmap->Width = Image1->Width Image2->Width Image3->Width;
Bmap->Height =Image1->Picture->Height;
Byte*ptr1, *ptr2,*ptr3;
//s_time = clock();
for ( int y=0; y < h; y ) {
ptr1 = (Byte *)Bmap1->ScanLine[y];
ptr2 = (Byte *)Bmap2->ScanLine[y];
ptr3 = (Byte *)Bmap3->ScanLine[y];
for ( int x=0; x < w; x ) {
ptr2[x*3] = ptr1[x*3];
ptr2[x*3 1] = ptr1[x*3 1];
ptr2[x*3 2] = ptr1[x*3 2];
ptr3[x*3] = ptr2[x*3];
ptr3[x*3 1] = ptr2[x*3 1];
ptr3[x*3 2] = ptr2[x*3 2];
}
}
我是新手 還不是很清楚 請各位大大幫我解一些疑惑
------
丫風
系統時間:2024-05-08 1:12:56
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!