NIP2(1)
β¨ NIP2(1) β¨
the nip2 manual page, section 1 of the General Commands Manual β bestie edition π
πΈ NAME πΈ
nip2 β image processing with the VIPS library π¦
π SYNOPSIS π
nip2 [filename1 ...]
nip2 -s filename [arg1 ...]
nip2 -e expression [arg1 ...]
π DESCRIPTION π
nip2 (it stands for New Image Processing, iykyk) is a tool for manipulating images using the VIPS image processing library. it's giving main character energy in the terminal, fr fr π
There are three principal modes, bestie. pick your fighter:
nip2 [filename1 ...]start in GUI mode, loading the named files β¨nip2 -e expression [arg1 ...]nip2 --expression=EXPRESSION [arg1 ...]start in no-GUI mode; setmain= expression, set listargvto["filename", "arg1", "arg2", ...], setargcto length of list; print the value of symbolmainto stdout; exit π«Άnip2 -s filename [arg1 ...]nip2 --script=FILENAME [arg1 ...]start in no-GUI mode; read in filename as a set of definitions, set listargvto["filename", "arg1", "arg2", ...], setargcto length of list; print the value of symbolmainto stdout; exit; useful for runningnip2as an interpreter on unix π
okay so you can use -o to direct output to a file rather than stdout. obsessed π
-o filename--output=FILENAMEthe value ofmainis written to the named file. Ifmainis a list, the filename is incremented between objects. You can use the suffix to specify the format and options to write in πΎ
Other options provide finer control over startup and shutdown. If you need to do something strange, don't use -e/-s, use these in combination. no cap π§
-b,--batchβ batch (ie. non-GUI) mode-m,--no-load-menusβ don't load menus, for faster startup β‘-a,--no-load-argsβ don't load extra command-line arguments-w,--stdin-wsβ load stdin as a workspace-d,--stdin-defβ load stdin as a set of definitions-p,--print-mainβ print the value ofmainon exit.nip2will check for a top-level symbol calledmain, and also check each workspace for amainπ
Finally some other options are useful for debugging, timing and for generating strings for internationalisation. the way thatβ¦ π
-V,--verboseβ produce verbose error messages: handy for debugging in batch mode-i,--i18nβ output strings from.deffiles for internationalisation π-v,--versionβ print version information-c,--benchmarkβ benchmark: no GUI, just start up and shut down-t,--time-saveβ time saves: after every image save a popup tells you the time the save took in seconds β±οΈ-T,--testβ test: start up (including any arg processing), test for any errors, and exit with an error code if any occured. Useful for running automated tests. π§ͺ-x PREFIX,--prefix=PREFIXβ set install prefix: start up as ifnip2had been installed to PREFIX. Useful for running automated tests without installing the thing.
π EXAMPLES π
nip2 fred.jpg
Start nip2, loading fred.jpg. πΌοΈ
nip2 -e "2 + 2"
Prints 4 to stdout. math ate that π
nip2 -e "99 + Image_file argv?1" -o result.png fred.jpg
Load argv1 (fred.jpg), add 99, output to result.png. π₯
nip2 -e "Matrix [[1,2],[4,5]] ** -1" -o poop.mat
Invert the 2x2 matrix and write the result to poop.mat. not the poop.mat π iconic
π COPYRIGHT π
2008 (c) Imperial College, London
and that's the whole page, bestie π«Ά this one's from the General Commands Manual, dated Oct 4 2004, and it lives at NIP2(1) β go forth and process them images β¨πΈπ
π¦ where this page comes from
- debian bookworm: nip2 8.7.1-4
- debian trixie: nip2 8.9.1-1+b2 Β· GPL-2.0-or-later
- fedora 43: nip2 8.9.1-5.fc43 Β· GPL-2.0-or-later
- fedora 44: nip2 8.9.1-6.fc44 Β· GPL-2.0-or-later
- nixos 26.05: nip2 8.9.1
- ubuntu jammy: nip2 8.7.1-2build1
- ubuntu noble: nip2 8.9.1-1build3 Β· GPL-2.0-or-later
- ubuntu questing: nip2 8.9.1-2
- ubuntu resolute: nip2 8.9.1-2build1 Β· 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