![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Jan 2007
Posts: 2
Rep Power: 0
![]() |
Scanline in Borland
In Borland C++
I have copied an Image1 to an array tab[x][y], now i wnant to copy pixels from that array to Image2 using ScanLine. I have used code: int tab[256][256], *LinePtr; void __fastcall TForm1::Button2Click(TObject *Sender) { for (int y=0; y<255; y++) { LinePtr = (BYTE *) Image2->Picture->Bitmap->ScanLine[y]; for (int x=0; x<255; x++) { LinePtr[x*3] = tab[x][y]; LinePtr[x*3+1] = tab[x][y]; LinePtr[x*3+2] = tab[x][y]; } } Image2->Refresh(); } But the image I have received is gray. The original one was colorful. How to use Scanline to receive original copied picture? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Borland C++ Builder 6 and TCP/IP Book/Guide | HybridStorm | C++ | 12 | Jan 23rd, 2006 7:38 PM |
| error with borland | dfoled | C++ | 6 | Oct 1st, 2005 3:05 PM |
| Borland C++BuilderX, fatal error | beezm | C++ | 3 | Aug 18th, 2005 12:48 AM |
| Borland C++ | Dudley | C++ | 13 | May 17th, 2005 1:55 PM |
| Borland c++ Release compile ! | Nysan | C++ | 0 | Apr 17th, 2005 3:01 PM |