gmic can't find pink

(Alexandre Cunha) #1

I have the pink library working well with gmic on linux but the OS X installation of gmic does not recognize the installed pink programs - all at /usr/local/bin. How do I tell gmic to find pink?

    Version 2.3.4, Copyright (c) 2008-2018, David Tschumperle.

Thanks for any help.

  • Alex

(G'MIC staff) #2

@KaRo is the one who can tell. He is responsible for the commands that invoke pink operators, and he is working on OSX as well, perfect match :slight_smile:

(Karsten R) #3

Hi, my pink wrapper is doing “which pink_exe” and/or “which pink.pink_exe”! This succeeds if the folder is in your PATH variable.
To test, I am typing in the terminal “asf” or “pink.asf”.

Using pink executables in the plugin, eg Gimp is a bit more cumbersome! There is anywhere (etc) a config file with the PATH variable for Gimp which has to be extended by the pink exe folder. Actually I have no access to my computer so I cannot look for!



(Alexandre Cunha) #4

Thanks Karsten for checking on this. The pink CLI installation is functioning well on OS X, i.e. calling pink.XXX on the console does what XXX is supposed to do. The same for gmic on CLI - I am not using it with gimp, just on the command line.

The problem is when using pink within gmic in OS X (works well on linux), for example,

> gmic foo.tiff -negate -pink areaclosing,4,200
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Input file ‘foo.tiff’ at position 0 (1 image 806x700x1x1).
[gmic]-1./ Negate values of image [0].
[gmic]-1./ Input file ‘-pink’ at position 1
[gmic]-1./ *** Error *** Unknown command or filename ‘-pink’ (did you mean ‘-line’ ?).

From a past post, my understanding is that if pink executables are in the PATH variable then gmic will make the call correctly. In my case they are in /usr/local/bin which is in my PATH but gmic seems not to understand the -pink directive or not able to find the pink.areaclosing executable,

> pink.areaclosing
usage: pink.areaclosing filein.pgm connex area fileout.pgm

Please let me know if there is a specific path for pink or gmic.


  • Alex

(Alexandre Cunha) #5

Just a quick note to say that gmic was installed using Macports, info below.

> port info gmic
gmic @2.3.6 (science)
Variants: universal

Description: G’MIC stands for GREYC’s Magic Image Converter. It is focused on the design of possibly complex pipelines for converting, manipulating,
filtering and visualizing generic 1d/2d/3d multi-spectral image datasets. This includes classical color images, but also more complex
data as image sequences or 3D volumetric images. G’MIC has been designed with portability in mind and runs on different platforms
(Windows, Unix, Mac OS X).

Build Dependencies: pkgconfig, pkgconfig
Library Dependencies: curl, ffmpeg, fftw-3, gimp2, GraphicsMagick, ilmbase, jpeg, libpng, opencv, openexr, tiff, xorg-libXext, zlib, qt5-qtbase
Platforms: darwin
License: CeCILL
Maintainers: Email:, GitHub: Schamschula
Policy: openmaintainer

(Karsten R) #6

This is a gmic script error! Do “gmic up” than “gmic h pink”. As long pink is not a command, you have not updated. in fact the “pure” gmic does not contain pink anymore!

(Alexandre Cunha) #7

“gmic up” solved the problem! Thanks a bunch.

> gmic h pink

gmic: GREYC’s Magic for Image Computing.

    Version 2.3.6, Copyright (c) 2008-2018, David Tschumperle.


  Pink wrapper name,p1,...,pn (requires the PINK library to be installed).
  prepares input, calls external "name input output" and reads output (/tmp)

  Example: [#1]  image.jpg +pink asfr,5 pink[0] asf,5

           [#2]  image.jpg +blur 2 pink maxima,4

(Karsten R) #8

Very good! Do the “gmic up” regularly to get latest script changes as well as the community additions (like pink)!

(Alexandre Cunha) #9

Many thanks for the tip.

(Karsten R) #10

No problem! The rare users of the IMHO excellent package pink have to be cared!

(Alexandre Cunha) #11

Pink is indeed an excellent complement to gmic.