範例程式中, 用了一個新的 Property, TBitmap::ScanLine, 在 C++ Builder 的影像元件 TImage 中, 包含了一個 TPicture 的元件, TPicture 又包含了一個 TBitmap 的元件, TBitmap::ScanLine 這個 Property 則是存放了每一行影像色彩存放在電腦記憶體中的起始位置, 因此, 有了這個記憶體位置, 就可以對影像內容進行存取(修改/讀取)。
另外, 這個程式不只可以處理彩色影像, 灰階影像也可以自動分辨與處理, 但必須要新增一個灰階調色盤, ..
灰階影像的實驗結果


彩色影像的實驗結果


沒有留言:
張貼留言