GMIC -gimp_LCE as cli command and as gimp plugin yields different results

Hi all,
I’m trying to use -gimp_LCE plugin setting from command line, as in

gmic XXX.JPG <path_to>\cli_update167.gmic -gimp_LCE 80,0.5,1,1,3,0 -output XXX-LCE.JPG

but when I visually compare the output with the gimp plugin result (same settings), they seem different to me.

This with both OSX and Windows.

Anyone out here that tried to do the same?

Best regards,
/gp

Could you please put the two different results somewhere so we can try to understand what is going on ?
Thanks by advance.

Thanks,
I’ve setup a sample in a flickr album

The original one, the gmic as gimp plugin (-gimp_LCE), the gmic as cmdline (same settings).

Thanks again
/gp

Indeed, I was able to reproduce the ‘bug’, and I must admit I have been very surprised to see different results too!
After some investigations, I found out that in the two cases (cli and gimp-plugin), the input data were simply not the same !
My guess is that GIMP does some color corrections when loading the image, while ‘gmic’ (the cli tool) reads the raw RGB colors directly from the JPG file without corrections.
If you save your .jpg file from GIMP into a .png and run ‘gmic’ on the .png, then you’ll get the same result finally!

Thanks for your quick reply, that I try to summarize:

  1. open the XXX.jpg file in GIMP (convert it to SRGB colorspace) and export a XXX.png version, close the XXX.jpg file.
  2. run GMIC from GIMP (as plugin) on the XXX.png file and export the result in XXX-LCE.png
  3. run GMIC as command on the XXX.png file and output the result in XXX-LCEcmd.png

I’ve followed this procedure, but the two images XXX-LCE.png and XXX-LCEcmd.png still look different.

I’m surely missing something, may you please be so kind to explain to me what do you intend with

“If you save your .jpg file from GIMP into a .png and run ‘gmic’ on the .png, then you’ll get the same result finally”

Thanks a lot for your patience. Regards.
/gp

Hello Gian,
Yes, that’s exactly how it should work.
I’ve done the test, and it works for me: http://imgur.com/a/dLnvg

(first image : bread_cli.png, second : bread_gimp.png, third : bread.png (original) ).
The two first images are the same (sames values, as checked with G’MIC).

 $ gmic bread*
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Input file 'bread_cli.png' at position 0 (1 image 1920x1280x1x3).
[gmic]-1./ Input file 'bread_gimp.png' at position 1 (1 image 1920x1280x1x3).
[gmic]-2./ Input file 'bread.png' at position 2 (1 image 1920x1280x1x3).
[gmic]-3./ Display images [0,1,2] = 'bread_cli.png, bread_gimp.png, bread.png'.
[0] = 'bread_cli.png':
  size = (1920,1280,1,3) [28 Mio of floats].
  data = (208,211,205,207,207,207,210,203,206,206,201,209,(...),116,113,119,117,118,111,119,123,119,123,125,123).
  min = 0, max = 255, mean = 115.673, std = 63.4188, coords_min = (783,15,0,0), coords_max = (873,336,0,0).
[1] = 'bread_gimp.png':
  size = (1920,1280,1,3) [28 Mio of floats].
  data = (208,211,205,207,207,207,210,203,206,206,201,209,(...),116,113,119,117,118,111,119,123,119,123,125,123).
  min = 0, max = 255, mean = 115.673, std = 63.4188, coords_min = (783,15,0,0), coords_max = (873,336,0,0).
[2] = 'bread.png':
  size = (1920,1280,1,3) [28 Mio of floats].
  data = (186,188,184,185,185,185,187,182,184,184,181,186,(...),116,113,119,117,118,111,119,123,119,123,125,123).
  min = 0, max = 255, mean = 115.72, std = 60.2178, coords_min = (793,103,0,1), coords_max = (1605,524,0,0).

What version of the cli version do you use ? Have you tried to update your filters from the cli interface ? (it is done automatically by the plug-in, but the cli interface requires an explicit update) :

$ gmic -update

Found!
I used to create a new layer with gimp, and the output png was different from cmd-generated one.

If in gimp I replace the existing layer the output png is the same.

Thanks you very much, now I realized.
/gp