Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Applying a GEGL function via commandline
#1
I downloaded some sheet music which was scanned into jpg format at rather low quality, thus yielding a hardly readable print-out. After applying the GEGL operation "brightness-contrast" with values 3.0 and -1.0, resp., the readability of the print-out improved (though still was not really good).
Now I'd like to apply that function to some more images without doing all those steps manually.
There is a command line for gimp, but I failed to find out which parameters I have to feed into it for that function (and never have I used the gimp commandline before...).
Could you show me how to do that? Thanks a lot.
Reply
#2
AFAIK the GEGL tools aren't available in the 2.8 Gimp API. But:

  1. There is a non-GEGL brightess/contrast tool in the current Gimp that works just as well (though actually settings could be slightly different). This one is part of the API.
  2. GEGL filters are also available through a gegl command for command-line environments and scripts (no personal experience)
  3. The Imagemagick toolbox has a convert command that will take -contrast and -modulate parameters to chnage contrast and brightness.
IMHO using ImageMagick is by far the simplest way.
Reply
#3
You can not use GEGL in the same way as a Gimp procedure.

Using Windows the first hurdle is finding a working stand-alone GEGL. You could try the new Gimp 2.9.6 development version.

That does have a GEGL that appears to work (not 100% convinced of this). Here is a screenshot: https://i.imgur.com/PTPQ41e.jpg

I am assuming you are looking for a command line to implement in a batch process. There are always other ways with Gimp. If you can post a typical example of the music score, then there is always a possibility of suggestions of other methods.
Reply
#4
(09-03-2017, 07:11 PM)rich2005 Wrote: You could try the new Gimp 2.9.6 development version.
Thanks for that hint. I tried it. The output file is bigger than the input file (80 vs. 71 kB), but I cannot see any difference.
I added the -v switch, and tried different values for the parameters: they were parsed correctly, but nothing happened...
Reply
#5
(09-04-2017, 05:15 PM)Bernhard Hiller Wrote:
(09-03-2017, 07:11 PM)rich2005 Wrote: You could try the new Gimp 2.9.6 development version.
Thanks for that hint. I tried it. The output file is bigger than the input file (80 vs. 71 kB), but I cannot see any difference.
I added the -v switch, and tried different values for the parameters: they were parsed correctly, but nothing happened...

I can not get gegl command 'brightness-contrast' working either.

Still suggest exploring some other more user friendly methods, such as ofnuts mentioned.
Reply


Forum Jump: