In Borland C++ Builder how do you access pixel values of an image object. I want to be able to convert a picture to grayscale and also count the color values of an image.
I am also trying to copy a small part of an image to a seperate image object.
You could use TBitmap->Canvas to set pixels. However, if it's speed you're after, use TBitmap->ScanLine, which returns a row (array) of pixels, as a void*. You need to cast the return of ScanLine, and the cast depends on the colour depth of your image.