【正文】
ture’s needs of the graphic images lays the foundation. The system merit has: the objectoriented design’s thought application of the c++ properties, Program’s structure is clear, good readability, codes has the full annotation in the program. Easy expansion and transplantation. Finally, system’s testing shows, system’s functions achieve the expected demand, friendly interface, and the operation is simple, also a much stable operation, it has basic functions of the graphic image system. As a whole, this paper describes the system design process and part of the process of designing code, it made some necessary explanations about key technology in the system, it made the detailed description to image transform of the basic principle, the image processing basic principle and various image formats. Key word: The imagery processing system, image display, image transforms. 目 錄 摘 要 ................................................................................................................................I Abstract......................................................................................................................... II 第一章 圖像處理系統(tǒng) ...................................................................................................... 1 概述 ................................................................................................................... 1 系統(tǒng)分析 ............................................................................................................ 1 需求分析 ................................................................................................. 1 可行性分析 .............................................................................................. 1 總體設(shè)計(jì) .......................................................................................................... 1 項(xiàng)目規(guī)劃 ................................................................................................. 1 系統(tǒng)功能架構(gòu)圖 ....................................................................................... 2 系統(tǒng)設(shè)計(jì) ............................................................................................................ 3 設(shè)計(jì)目標(biāo) ................................................................................................. 3 開發(fā)及運(yùn)行環(huán)境 ....................................................................................... 3 技術(shù)準(zhǔn)備 ............................................................................................................ 3 基本繪圖操作 .......................................................................................... 3 內(nèi)存畫布的設(shè)計(jì) ....................................................................................... 3 自定義全局函數(shù) ....................................................................................... 4 自定義菜單 .............................................................................................. 5 自定義工具欄 .........................................................................................11 主要功能模塊的設(shè) 計(jì) ......................................................................................... 12 系統(tǒng)架構(gòu)設(shè)計(jì) ........................................................................................ 12 公共模塊設(shè)計(jì) ......................................................................................... 14 主窗體設(shè)計(jì) .......................................................................................... 14 參考文獻(xiàn): .................................................................................................................... 18 致謝 ............................................................................................................................... 20 1 第一章 圖像處理系統(tǒng) 概述 圖像處理技術(shù) 一直是困擾 Visual C++初學(xué)者的一個(gè)難題,在 Visual C++中,沒有一個(gè)完善的控件能夠顯示和處理各 種格式的圖像,有時(shí)用戶需要了解各種圖像的文件格式,這極大地增加了初學(xué)者的學(xué)習(xí)難度。 GDI+又稱為 GDIPlus,是微軟公司 .NET 構(gòu)架的一部分,它封裝了各種圖像的 處理技術(shù)。 ? 其他模塊 該模塊主要包括設(shè)置菜單的固定顏色和隨機(jī)顏色兩個(gè)部分。例如圖像旋轉(zhuǎn)、灰度化處理、線性變換等。 CDC 提供 BitBlt、 StretchBlt 等方法來輸出位圖,但是這些方法均需要借助另一個(gè) CDC 對象來實(shí)現(xiàn)。 自定義全局函數(shù) 在 Visual C++中沒有提供直接的函數(shù)用于獲取文 件的名稱(去除擴(kuò)展名)和獲取文件的擴(kuò)展名(去除文件名)。 資源 ::FreeLibrary(hModule)。 // 菜單項(xiàng)的類型 2:頂層菜單, 1:彈出式菜單, 0:分隔條,其他:普通菜單 (3) 向 CCustomMenu 類中添加成員變量 。 CCustomMenu::~CCustomMenu() { if (m_ItemCount 0) //如果菜單項(xiàng) 0,則釋放菜單列表 delete []m_MenuList。 pMenu FirstFind intcount=pMenuGetMenuItemCount()。 CRect rc = 。 for (int j=0。 void CCustomMenu::SetMenuItemText(CDC *pDC, LPSTR strMenuText, CRect Rect) { (20,0)。 10 (14)向 CCustomMenu類中添加 DrawMenuBk 方法,繪制菜單項(xiàng)的背景顏色。 //讀取漸變終點(diǎn)的顏色值 r2 = Get