VISGREP(1)
π VISGREP(1) β the visual grep era π
okay bestie, pull up a chair because we're about to talk about visgrep, a page from the General Commands Manual, and honestly? she eats. she greps for images. inside another image. that's the whole vibe. π¦
β¨ NAME β¨
visgrep β visual grep, aka she greps for images in another image. no cap.
β¨ SYNOPSIS β¨
visgrep [options] image.png detect.png match.png ...
β¨ DESCRIPTION β¨
so. visgrep is a program that greps for image in another image. periodt. π
the detect.png and match.png files can also be .pat files. like, they're allowed. it's giving flexible.
all .pat files are created using png2pat(1) or rgb2pat(1). the image.png gets scanned for detect.pat starting from X,Y given in parameters. when detect.pat is found, then all the match.pat files are scanned at an offset of x,y given in parameters. if a match is found, then visgrep prints the x,y and index of the item. iconic behaviour fr fr. β¨
for example, image.png is a screenshot and match1.pat .. match5.pat are images of letters a to e. each of these letters is enclosed in a blue box, so detect.pat is an image of the upper left corner of the box. this box is not included in the match*.pat files, so they are actually offset 5 pixels down and 4 pixels to the left. you might run it like this then:
visgrep -x-4 -y5 image.png match_corner.pat match_a.pat match_b.bat
...and so on, with all matches listed. now suppose the screen showed ace so visgrep might output:
10,10 0
50,10 2
90,10 4
showing that match_a.pat (index 0) is at 10,10 on the screen. if no match is found even though the detection image is found, the index will be -1. yes, negative one. she's just saying "found the box bestie, but nothing was in it". π
β¨ OPTIONS β¨
a summary of options is included below. slay.
-hβ show summary of options. the little help me out moment π«Ά-xβ set x offset for detection matching.-yβ set y offset for detection matching.-Xβ start scanning at X. (capital letter era π)-Yβ start scanning at Y. (also capital, also royal)-tβ set tolerance for 'fuzzy' matches, higher numbers are more tolerant. the bigger the number, the more she's willing to forgive π
ok bestie, note the case:-xand-Xare NOT the same thing and neither are-yand-Y. lowercase = offset, uppercase = where the scan starts. do not mix them up i am begging π
β¨ EXIT STATUS β¨
0β at least one match was made. we ate. π₯1β no matches were made. she looked. she found nothing. π2β an error occurred. something went wrong and it's giving chaos. π
β¨ SEE ALSO β¨
pat2ppm(1), patextract(1), png2pat(1), rgb2pat(1), xte(1).
go read those too, they're the friend group. π
β¨ AUTHOR β¨
visgrep was written by Steve Slaven <bpk@hoopajoo.net>.
this manual page was written by Aurelien Jarno <aurel32@debian.org>, for the Debian project (but may be used by others). generous queen behaviour honestly π
and that's the whole page bestie!! this version of the General Commands Manual page for visgrep is dated April 20, 2004, which is genuinely older than most of us, but she's still serving. mwah πβ¨ππ¦πΈ
π¦ where this page comes from
- debian bookworm: xautomation 1.09-4 Β· GPL-2.0-or-later
- debian trixie: xautomation 1.09-4+b1 Β· GPL-2.0-or-later
- ubuntu jammy: xautomation 1.09-4 Β· GPL-2.0-or-later
- ubuntu noble: xautomation 1.09-4build2 Β· GPL-2.0-or-later
- ubuntu questing: xautomation 1.09-4build2
- ubuntu resolute: xautomation 1.09-4build3 Β· GPL-2.0-or-later
- ubuntu stonking: xautomation 1.09-4build3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms