Reference

Table of Contents  ▸  List of Commands  ▸  User Karo's PINK-library operators  ▸  pink_newpink_grayskel  ▶

pink_new

Arguments:

Description:

Pink wrapper (requires the PINK library to be installed), see https://perso.esiee.fr/~coupriem/pinktutorial/ (in French) and https://perso.esiee.fr/~coupriem/Pink/doc/html/index.html (in English)

Shortcut: pink
Prepares input, calls external "pink_cmd input p1...pn output" and reads output (/tmp) and replaces positional IMAGE parameters bei temp. files. These images are not splitted and merged. They have to have the necessary format for the respectice pink executable. Only Pink routines with input file(s) and ONE output file can be called. Images with spectral channels (s>1) are splitted, processed one by one and merged.
ATTENTION positional image parameter are never spitted and merged in contrast to selected (input) and output images. Positional image parameter should already have the needed format for the selected pink binary!
pink_new prepares selected images and image parameter as pnk files in auto mode and creates a command string. File format of generated input pnk file can be forced by an option attached to the "pink_cmd" by "pink_cmd:if-<type>", e.g. "asf:if-uchar", overwriting auto mode. Images (splitted if spectrum s > 1) are processed one by one and are written as pnk files to temporary space, outfile is a pnk file name pointing to temporary space too. The executed call looks like
"pink_cmd infile p1 ... (px)imagefile ... pn outfile".
For help of pink executable a call "pink_new help,pink_cmd" calls the executive command
"open https://perso.esiee.fr/~coupriem/pinktutorial/<pink_cmd>_8c.html" instead of a pink binary.
OS variables:
GMIC_PINK_NO_RM == true: created files in temporary space are not removed
GMIC_PINK_VERBOSE == true: created cmd string and pink messages are printed

Examples of use:

• Example #1

$ gmic sp tiger +pink_new. asfr,5 pink_new.. asf,5

Command: sp tiger +pink_new. asfr,5 pink_new.. asf,5
Command: sp tiger +pink_new. asfr,5 pink_new.. asf,5

• Example #2

$ gmic sp tiger +blur 2 round. pink_new maxima,4

Command: sp tiger +blur 2 round. pink_new maxima,4
Command: sp tiger +blur 2 round. pink_new maxima,4

• Example #3

$ gmic sp to_gray ir. 0,50% +pink_new. distc,3 +negate.. +pink_new... dist,3 pink_new[1] bisector,[0] pink_new[3] bisector,[2] k[1,3] a c

Command: sp to_gray ir. 0,50% +pink_new. distc,3 +negate.. +pink_new... dist,3 pink_new[1] bisector,[0] pink_new[3] bisector,[2] k[1,3] a c

• Example #4

$ gmic sp 2 +pink_new. dilatballnum,5 +-

Command: sp 2 +pink_new. dilatballnum,5 +-
Command: sp 2 +pink_new. dilatballnum,5 +-
Command: sp 2 +pink_new. dilatballnum,5 +-

• Example #5

$ gmic sp 2 +pink_new. asf,5 -

Command: sp 2 +pink_new. asf,5 -

• Example #6

$ gmic sp boats ir. 0,50% +pink_new. dilatballnum,10 +pink_new.. distgeo,.,4

Command: sp boats ir. 0,50% +pink_new. dilatballnum,10 +pink_new.. distgeo,.,4
Command: sp boats ir. 0,50% +pink_new. dilatballnum,10 +pink_new.. distgeo,.,4
Command: sp boats ir. 0,50% +pink_new. dilatballnum,10 +pink_new.. distgeo,.,4

• Example #7

$ gmic sp barbara +pink_new. seuilauto,128,max,3

Command: sp barbara +pink_new. seuilauto,128,max,3
Command: sp barbara +pink_new. seuilauto,128,max,3

• Example #8

$ gmic sp 1,512,512 colorwheel 512 +pink_new. average,..

Command: sp 1,512,512 colorwheel 512 +pink_new. average,..
Command: sp 1,512,512 colorwheel 512 +pink_new. average,..
Command: sp 1,512,512 colorwheel 512 +pink_new. average,..