Board index » cppbuilder » Re: Bitmap pixel access

Re: Bitmap pixel access


2006-08-18 12:32:33 AM
cppbuilder27
"Michael" < XXXX@XXXXX.COM >wrote in message
Quote
Can any one help me with the most optimal way to
access bitmap pixels for image manipulation.
Use the TBitmap::ScanLine property. That provides direct access to each row
of pixel data, where the Height specifies the number of rows, and the Width
specifies the number of items in each row. The format of the data depends
on which PixelFormat is being used. For example, if the PixelFormat is
pf8bit, then each ScanLine item will contain an array of bytes, 1 per pixel,
which are indexes into the bitmaps' color palette. On the other hand, if
the PixelFormat is pf24bit, then each ScanLine item will contain an array of
RGBTRIPLE values, 1 per pixel, which are the actual color values, so no
color palette is used.
Gambit
P.S. check your computer clock settings. You are 7 years behind.
 
 

Re:Re: Bitmap pixel access

Is that going to work as I need to set up a 2d array of pixels so I can
access them as rows and columns.
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Michael" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>Can any one help me with the most optimal way to
>access bitmap pixels for image manipulation.

Use the TBitmap::ScanLine property. That provides direct access to each
row
of pixel data, where the Height specifies the number of rows, and the
Width
specifies the number of items in each row. The format of the data depends
on which PixelFormat is being used. For example, if the PixelFormat is
pf8bit, then each ScanLine item will contain an array of bytes, 1 per
pixel,
which are indexes into the bitmaps' color palette. On the other hand, if
the PixelFormat is pf24bit, then each ScanLine item will contain an array
of
RGBTRIPLE values, 1 per pixel, which are the actual color values, so no
color palette is used.


Gambit

P.S. check your computer clock settings. You are 7 years behind.