Manipulate image

I use Keyboard Maestro to capture a particular area of the screen and send it to clipboard. I then use an OCR App to translate the image text to another language. I need to do some image cleanup before sending it to the clipboard in order to improve the OCR result. What is the best way to do this? Basically I need to change certain pixel in the image to another color depending on its current color.

@Tom posts a lot of clever tips with image tools. He may have a quick answer for you.

Keyboard Maestro does not have any native method of testing the color of a pixel in an image you have already captured (you can test the color of a pixel on the screen).

So you’ll probably have to use some other sort of toll or script solution.

Have you tried a different OCR software?

I’m quite happy with Prizmo. Its a fully-fledged OCR software and it comes with an integrated tool that allows you to capture a region of the screen. The image then is sent directly to the OCR engine. ($50)

Another app, which is specialized in screen-grab OCR, is Condense. (I’m not sure if it is still actively developed, but it still works and is only $5.)

If you really want to programmatically change the colors of pixels, then probably ImageMagick can do something (see Replacing Colors in Images).

Hey @rhap4boy,

Can you share this macro please?

I have been trying to make a macro that will ocr a screenshot and put the text from the image into clipboard. It would be immensely useful for me.

Thank you.

1 Like