Release of G'MIC 3.0

Hello nice people here, I run into a weird problem; when I view the update298.gmic file, it shows Chinese characters. I have no idea what’s going on and how to fix it:


Does anyone know what’s going on?

It’s perfectly normal.
The update file is encoded in UTF-8, and what you see at the beginning of the file is actually the chinese translation of some of the filters.

1 Like

But how can I view it in a “not encoded” way?

I don’t think you can. Why would you do this?

1 Like

Ah, now I understand. I’m slow as you know :rofl:

Thank you very much for reply. I now see this is great for Chinese people. :+1:

G’MIC becomes multilingual I see now.

@David_Tschumperle,

I really appreciate that you never react angrily when I ask for something “stupid”. Sometimes I just don’t see things that quickly. I hate that it takes time for you and others. My apologies for that.

No worries, it goes with the job of free software manager :slight_smile:
Questions are never stupid (strong statements can be sometimes, on the other hand).

1 Like

Well, not exactly there yet. There’s still quite a lot to do in terms on that area, and quite a ton of filters to do, and tons of filter to translate. Not to mention translation of community filter would require approval from the filter author as in they’re technically complete. Some are buggy.

@iarga @Reptorian That is Japanese, which borrows characters from the traditional Chinese. To my understanding, this way of translation has been deprecated in favour of a new method at c-koi/gmic-qt. See post 291, which replaces words or phrases but could present problems I noted. I am guessing, with the new method, the translations won’t show up like that in stdlib.

And would require PRs. I wonder if we could move the location to community to at least make translations and their edits more accessible to the translation effort.

Is anyone else not getting line number on where’s the error on custom commands?

Also, how would I fix this?

corner_0_x={$pos_x1+$offx}
corner_0_y={$pos_y1+$offy}
corner_1_x={$pos_x1-$offx}
corner_1_y={$pos_y1-$offy}
corner_2_x={$pos_x2+$offx}
corner_2_y={$pos_y2+$offy}
corner_3_x={$pos_x2-$offx}
corner_3_y={$pos_y2-$offy}

repeat 4
 set. 255,$corner_$>_x,$corner_$>_y
done

Pretty sure I did that before.

Could you elaborate on both questions? What are the bugs exactly?

Elaboration 1:

C:\Windows\System32>gmic 500,1500 rep_thickline_antialias 10%,20%,80%,95%,5
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Input black image at position 0 (1 image 500x1500x1x1).
[gmic] *** Error in ./rep_thickline_antialias/*repeat/ *** Item substitution '{$corner_0_x}': Unrecognized item '$corner_0_x' in expression '$corner_0_x'.

Before, there was line number info on where’s the error at. So, I’m not sure why it isn’t here anymore.

Elaboration 2: Note what I’m trying to do is to insert $> as part of a variable name and then in the end it should grab the value from one of the corner case. I’m not sure why it doesn’t happen. But, I did found another workaround though.

foo1 :
  v + var={}

> [gmic]-0./foo1/ *** Error *** Item substitution '{}': Empty braces.

foo2 :
  v + repeat 2 var$>=$> done

> [gmic]-0./foo2/*repeat/ Set local variable 'var0=0'.
> [gmic]-0./foo2/*repeat/ Set local variable 'var1=1'.

Maybe try ${corner_$>_x}.

1 Like

Broken!

> gmic up
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Update command definition file 'C:UsersafreAppDataRoaminggmicupdate298.gmic' from the G'MIC server.
[gmic]-0./ End G'MIC interpreter.
> gmic h norm

  norm:
[gmic] *** Error in ./h/help/*if/(...)/*local/*if/parse_cli_text_ascii/*if/ *** Command 'eval': Unrecognized function call 'repeat(l,p, i(#p)==_'\n'?( h(#p)>2?resize(#p,1,1,1,1,0) ):((...)' in expression 'repeat(l,p, i(#p)==_'\n'?( h(#p)>2?resize(#p,1,1,1,1,0) ):((...)'.
[gmic] Command 'eval' has the following description:

  eval (+):
      expression
  eval (+):
      expression

    Evaluate specified math expression.
     * If no command selection is specified, the expression is evaluated once
    and its result is set to status.
     * If command selection is specified, the evaluation is looped over
    selected images. Status is not modified.
      (in this latter case, 'eval' is similar to 'fill' without assigning the
    image values).

PS Bump @Reptorian’s report that errors in the regular interpreter don’t specify the line number.

Please update to latest 2.9.8_pre, posted yesterday.
2.9.8 now uses the new math parsers functions repeat() and fill().

Also, line numbers are now only displayed if the G’MIC command file has been included explicitely with the debug_mode (command command). This, because managing debug information has a cost in terms of performance, so it is disabled by default.

1 Like

Can is_percent() be made as an always available function for math parser? I had to “steal” the is_percent code elsewhere to do this.

Could you give us a usage example? Thanks.

$ gmic -m 1,my_command_file.gmic

I was hoping for something like

gmic m 1,foo

which indicates which file and line this error occurred.


Old display bug happens when there are infs or nans. See overlay.

Feature request

@bkv would like to have Jzazbz in the Curves filter.