One way to do this, which works as long as the text is not smoothed, as in your image:
In your application, take a screenshot of another application window. Find a screenshot for all non-white pixels. Make a list of all non-white pixels. For each pair of non-white pixels in the list, if the pair touches each other, put them in the same βgroupβ. Do this until all pixels are grouped.
Then, for each group, compare its shape with a table of predefined shapes. If the figure is not in the table, ask the user to enter a letter, and then save the figure and its letter in the table.
You now have ASCII codes for all letters in the window.
This is not the cleanest way to clear text from a window, but it's hard to beat. For any movement made by another application to make text more difficult to read by a computer, it becomes more difficult for a person to read, which reduces the usefulness of the application.
source share