Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Working with Bitmap at Run-time (Help)
Here's my code :
I am trying to change all the blue pixels in a bitmap to
a color I choose.
1) I would like to know how to compare a Bitmap byte color
with a TColor Value ?
2) Is there a better way of doing this ?
liY, liX : Integer;
loGusBitmap : TBitmap;
loBytes : PByteArray;
For liY := 0 to loGusBitmap.Height- 1 do
loBytes := loGusBitmap.ScanLine[liY];
For liX := 0 to loGusBitmap.Width - 1 do
if (loBytes[liX] = clBlue) // Problem Here !!!!!
then loBytes[liX] := ReportColor;