請問關於 VC 影像語法改寫到 BCB 中 |
答題得分者是:ikk
|
chocola1983
一般會員 發表:3 回覆:2 積分:1 註冊:2009-05-24 發送簡訊給我 |
以下是某個攝影機的 SDK 中的範例程式
//------------------------------------------------------------- // The variables below are expected to be defined properly. // The 'extern' declaration is only chosen for syntactical correctness // as stand-alone example. extern ID_TYPE nCamId; // id of an already opened camera extern UINT32_TYPE nHorizontalResolution; // the currently configured image size extern UINT32_TYPE nVerticalResolution; // ATL::CImage Image; Image.Create( nHorizontalResolution , -1 * nVerticalResolution , 24 ); UNI_RETURN_TYPE hr = UCC_GrabBitmapImage( nCamId , (UINT8_TYPE*) Image.GetBits() , INFINITE ); //------------------------------------------------------------- 其中 ATL::CImage Image; Image.Create(); Image.GetBits() 在 google 上面找過後,是 VC 的內建函式 請問,我要如何將它改寫成 BCB 可用的語法? 或是請各位前輩提示一下可以使用哪些 BCB 的元件或函式 編輯記錄
chocola1983 重新編輯於 2009-05-24 21:45:46, 註解 改標題‧
|
ikk
尊榮會員 發表:4 回覆:413 積分:768 註冊:2003-06-30 發送簡訊給我 |
|
chocola1983
一般會員 發表:3 回覆:2 積分:1 註冊:2009-05-24 發送簡訊給我 |
我有嘗試將
ATL::CImage Image; Image.Create( nHorizontalResolution , -1 * nVerticalResolution , 24 ); 改寫成 Graphics::TBitmap *TempBitmap; TempBitmap = new Graphics::TBitmap(); TempBitmap -> Width = 640; TempBitmap -> Height = 480; TempBitmap -> PixelFormat = pf24bit; 不曉得這樣對不對 另外,Image.GetBits() 實在不曉得該用什麼去代替 我嘗試用 TempBitmap 直接去取代 Image.GetBits(),compile 可以過 但是還是沒辦法順利抓到圖片 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |