What kind of figure? I'll assume you're dealing with raster images. What kind of image format are you using? Do you mean *completely* black/white or *mostly* black/white?* Do you care about alpha channels (i.e. transparency)?
As a wild stab in the dark I'd suggest GD's getPixel() and rgb() methods.
*) and I note that greyscale images that are *mostly white* usually have *figures* that are mostly black.