What do you mean by "rendering of some common programming languages"?
And yes, taking an image of a screen is not going to work so well in most cases, the background is too hard for the preprocessing step unless there are clearly pure black/white regions.