Release of G'MIC 2.9

If I type “env” there is no variable OSTYPE, still it is found with $ echo $OSTYPE. Possibly that is zsh internal defined. I’ll try with bash!

And do you think there could be an environment variable specific to darwin that I could test inside G’MIC ?

At least under “env” I don’t see any!

What about a user defined one e.g. GMIC_MAC ? I hesitated already if this strong solution is good for all other mac users. Those with one large monitor might prefer the comfortable placement and size solution for this mode?

I don’t know.
I’d say, you are the one who use gmic on a Mac, so you decide what is the best to do.
Then you tell me, and I’ll do it :slight_smile:

I’m not such a typical Mac user, still actually I have

GMIC_SYSTEM_PATH=/Users/karo/.cache/gmic
GMIC_PINK_VERBOSE=0
GMIC_PINK_NO_RM=0

Maybe a boolean GMIC_MAC or some sort of GMIC_OSTYPE=$OSTYPE could help. Still I hesitate to have to system specific things. The latter would be quite near the linux system!

Maybe we can use the result of uname to detect a MacOSX system inside G’MIC, so we can avoid having to define an additional variable.
What the output of uname for you ?

Yes, a solution

/Users/karo $ uname

Darwin

I am using gnu extensions, still uname from apple is the same! Still that won’t allow any possibilities for other Mac users!

Does this command work for you ?

#@cli is_macosx
#@cli : Return 1 if current computer OS is Darwin (MacOSX), 0 otherwise.
is_macosx :
  if !narg($_is_macosx) l[]
    file=${-path_tmp}gmic_uname
    x "uname >"$file
    it $file
    _is_macosx={same(crop(),'Darwin',6,0)}
    rm
  onfail _is_macosx=0 rm
  endl fi
  u $_is_macosx

Test with

$ gmic e \$\{-is_macosx\}

Thanks.

Ok, result is “1” under zsh and bash, but that should not matter. Hopefully nobody will try “dp” under the plugin, app environment is quite different compared to terminal processes!

OK, so I add the is_macosx command, and test it in display2d to avoid window moving/resizing on a Mac environment.

Very good David. Before the last update I had a “is_mac” function. Did you replace it by “is_macosx”? If not I don’t know from where it came.

Lunch time and time for a 1 km walk to get some Normandy fresh air!

Thank you

Karsten

Yes, I’ve changed the name is_macis_macosx.

Where in Normandy ? Just curious :slight_smile: We are probably not far aways from each other.

no no, I am in Germany. The wish was for you! We can walk still without limit!

Ah Ok. No, unfortunately in France, you cannot walk for more than 1h / day. That’s the law now… :frowning:

I know still with that 1km from home. I just phoned with a friend in Alsace (!!). He is walking 55min and he is high risk group!

When image is displayed, Access is denied. follows the stats line.

That is strange. Might be something to do with the new test done by the is_macos command.
I’ll just made an attempt to fix this, will be ready in a few minutes.

@David_Tschumperle, and other G’MIC-people.
I might interested be in the gmic parse_gui
and how print filter parameters
i need an example thanks

Example : you can output information about a filter or a set of filter, in JSON format, like this:

$ gmic parse_gui kalei,json ot out.json

here all filters whose name contains ‘kalei’ will be selected for the output.

And here is the file generated:
out.json (8.5 KB)

If you have a request for a specific output format, let me know, for now there are only a few output formats available.