System.Drawing.Bitmap
has this method:
public Color GetPixel ( int x, int y );
Apart from that, it appears that determining whether the bitmap represents a triangle, square, or rectangle requires quite a bit more tenacity and resourcefulness than finding that method. Are you sure you are up to it?