I've an IntPtr which points to the location where a Bitmap stores its raw image, i.e. not pointer to the bitmap object, but pointer to the image data itself (which I obtained through BitmapData.Scan0)

Now I've a structure like this
VBCode Code:
  1. Structure RGB
  2.     B As Byte
  3.     G As Byte
  4.     R As Byte
  5. End Structure

I need to be able to access the individual pixels (which I locate using the pointer) on the image as this RGB Structure.
In other words, it's like casting the pointer as a structure type. In C# it may be something like (RGB*) bmpptr;

Anyone know how?

Thanks in advance.