How to programmatically split image from different color? [on hold]

I need to programmatically slipt this image [Image][1] which has been merged ( by using two images form this site [original link][2] ) with a "center block color": in this case green.

is there any API or to do this or is this possible to do that with any common programming language like C# ?