There are several ways to access the data in a RasterImage
. If you need to get the RGB values of each pixel, then the GetPixel()
and GetRow()
methods are the simplest methods to use.
Few Pixels
If you need to get just one pixel, then GetPixel()
is the easiest. GetPixel()
works with image data of any bits per pixel and returns a RasterColor
that includes the alpha channel information for 32 and 64 bit images. The sample below uses GetPixel()
to fill the buffer with the entire image (not recommended—more on that below).