Hacker News new | past | comments | ask | show | jobs | submit login

You can highlight text in GIMP:

(1) Create new layer from visible.

(2) Select the text using the text tool.

(3) Set zoom to 100%.

(4) Screenshot.

(5) Paste screenshot.

(6) Floating layer to new layer.

(7) Align screenshot layer with the new-from-visible layer.

(8) Difference layer mode.

(9) If the selection did not fit on screen, duplicate the new-from-visible layer.

(10) Merge down.

(11) Select the selection box with the fuzzy select tool. (You may need to delete the regions of the merged layer that represent the GIMP UI to do this.)

(12) Select → Remove Holes.

(13) Invert selection.

(14) Delete.

(15) Invert selection.

(16) Delete.

(17) Fill (with a block colour of your choice).

(18) Hide the layer, then goto step 2 until all of the selection is accounted for.

(19) Merge all the block colour layers together.

(20) Re-order the block colour layer under the text layer.

(21) Reduce opacity to taste.

See! It's theoretically possible to assign the desired pixel values using GIMP, therefore GIMP is perfect and has no problems at all. In fact, you can automate this with a very simple combination of AutoHotKey and Script-Fu (passing control data from Script-Fu to AutoHotKey using PixelGetColor), which is practically as good as having it built-in.

(More seriously: you can probably do gimp-vectors-new-from-text-layer, segment it into glyphs, take only the glyphs within a selection, split those into lines, find bounding boxes for those lines, and fill them with the current foreground colour, but there appears to be no way to query the current text selection from Script-Fu, so you'd have to use this with the Lasso selection tool or something.)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: