Quantcast

GEGL - run C2g batch in command line

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GEGL - run C2g batch in command line

oneaty
Hello folks!

Is there some way how to run Tools/GEGL/C2G convertion in command line like
batch?

For example - I have 10 pictures which I want to convert with some params. This
conversion takes a lot of time when you have to load picture into Gimp, set C2G
params and convert. I would like to convert it trough night like batch


Thx for your advice in advance.

Waldauf

--
waldauf (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GEGL - run C2g batch in command line

Casey Connor-2
Sorry to derail -- but this piqued my interest in c2g -- where can one
find it in recent GIMPs? It's not in the Tools->GEGL menu... (I'm on
otto-kesselgulasch-gimp-edge PPA).

Thanks,
-c

On 01/23/2017 01:55 AM, waldauf wrote:

> Hello folks!
>
> Is there some way how to run Tools/GEGL/C2G convertion in command line like
> batch?
>
> For example - I have 10 pictures which I want to convert with some params. This
> conversion takes a lot of time when you have to load picture into Gimp, set C2G
> params and convert. I would like to convert it trough night like batch
>
>
> Thx for your advice in advance.
>
> Waldauf
>

_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GEGL - run C2g batch in command line

oneaty
>Sorry to derail -- but this piqued my interest in c2g -- where can one
>find it in recent GIMPs? It's not in the Tools->GEGL menu... (I'm on
>otto-kesselgulasch-gimp-edge PPA).
>
>Thanks,
>-c

In gimp 2.9.5 the menu entry is

colors -> desaturate -> color to gray

For incorporating in a batch operation? AFAIK since c2g does not show in the
procedure browser, it might not be possible.

rich: www.gimp-forum.net

--
rich2005 (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GEGL - run C2g batch in command line

Partha Bagchi-2
In reply to this post by Casey Connor-2
It's under Colors -> Desaturate -> Color to Gray

On Mon, Jan 23, 2017 at 2:15 PM, Casey Connor <
[hidden email]> wrote:

> Sorry to derail -- but this piqued my interest in c2g -- where can one
> find it in recent GIMPs? It's not in the Tools->GEGL menu... (I'm on
> otto-kesselgulasch-gimp-edge PPA).
>
> Thanks,
> -c
>
> On 01/23/2017 01:55 AM, waldauf wrote:
>
>> Hello folks!
>>
>> Is there some way how to run Tools/GEGL/C2G convertion in command line
>> like
>> batch?
>>
>> For example - I have 10 pictures which I want to convert with some
>> params. This
>> conversion takes a lot of time when you have to load picture into Gimp,
>> set C2G
>> params and convert. I would like to convert it trough night like batch
>>
>>
>> Thx for your advice in advance.
>>
>> Waldauf
>>
>>
> _______________________________________________
> gimp-user-list mailing list
> List address:    [hidden email]
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
> List archives:   https://mail.gnome.org/archives/gimp-user-list
>
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GEGL - run C2g batch in command line

Partha Bagchi-2
In reply to this post by oneaty
If I am not mistaken, you need to put everything in an XML file as gegl
from command line needs an XML file to operate on. Put everything in an XML
file and then do the following:
gegl file.xml -o output.png.

Once you do that I am sure you can figure out how to do that for 10 images.

Anyway, that's my understanding. Others may be more helpful to you.

HTH,
Partha

On Mon, Jan 23, 2017 at 4:55 AM, waldauf <[hidden email]> wrote:

> Hello folks!
>
> Is there some way how to run Tools/GEGL/C2G convertion in command line like
> batch?
>
> For example - I have 10 pictures which I want to convert with some params.
> This
> conversion takes a lot of time when you have to load picture into Gimp,
> set C2G
> params and convert. I would like to convert it trough night like batch
>
>
> Thx for your advice in advance.
>
> Waldauf
>
> --
> waldauf (via www.gimpusers.com/forums)
> _______________________________________________
> gimp-user-list mailing list
> List address:    [hidden email]
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
> List archives:   https://mail.gnome.org/archives/gimp-user-list
>
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GEGL - run C2g batch in command line

Øyvind Kolås-2
In reply to this post by oneaty
On Mon, Jan 23, 2017 at 10:55 AM, waldauf <[hidden email]> wrote:
> Hello folks!
>
> Is there some way how to run Tools/GEGL/C2G convertion in command line like
> batch?
>
> For example - I have 10 pictures which I want to convert with some params. This
> conversion takes a lot of time when you have to load picture into Gimp, set C2G
> params and convert. I would like to convert it trough night like batch
>

In recent GEGL releases there is an underdocumented commandline
one-liner shorthand to avoid creating XML documents:

For instance:

gegl input.jpg -o output.png -- c2g radius=1300 samples=4 iterations=23 vignette

will apply the c2g operation with the following paramteres, followed
by the vignette filter with default parameters. To make this apply to
multiple images one could for instance do:

mkdir /tmp/out ; for a in *.jpg; do echo $a; gegl $a -o
/tmp/out/$a.png -- gegl:c2g radius=1300 samples=4 iterations=90 ; done

GEGL will complain if you specify properties not valid for a given
operation and print the exisiting properties that can be assigned. If
the gegl: prefix is avoided on an operation gegl tries with gegl:
pre-pended.

/pippin
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GEGL - run C2g batch in command line

oneaty
>In recent GEGL releases there is an underdocumented commandline
>one-liner shorthand to avoid creating XML documents:
>
>For instance:
>
>gegl input.jpg -o output.png -- c2g radius=1300 samples=4
>iterations=23 vignette
>
>will apply the c2g operation with the following paramteres, followed
>by the vignette filter with default parameters. To make this apply to
>multiple images one could for instance do:
>
>mkdir /tmp/out ; for a in *.jpg; do echo $a; gegl $a -o
>/tmp/out/$a.png -- gegl:c2g radius=1300 samples=4 iterations=90 ; done
>
>GEGL will complain if you specify properties not valid for a given
>operation and print the exisiting properties that can be assigned. If
>the gegl: prefix is avoided on an operation gegl tries with gegl:
>pre-pended.
>
>/pippin

Great... many thanks you. I'll try it today or tomorrow evening and will say. :]

Walda

--
waldauf (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GEGL - run C2g batch in command line

oneaty
Works like charm. Many thanks! :]

--
waldauf (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GEGL - run C2g batch in command line

oneaty
Hello,

I did test where I converted picture to BW in Gimp and command line with GEGL. I
have to say that there is big different between this two ways. Always I used
both default parameters:
* radius = 300
* samples = 4
* iterations = 10

Converting in Gimp taked around 8 seconds.

Converting in GEGL taked around 28 seconds:
% gegl res_WLDF1130.jpg -o res_WLDF1130_gegl.JPG -- c2g radius=300 samples=4
iterations=10
EEEEeEeek! 1 GeglBuffers leaked
gegl res_WLDF1130.jpg -o res_WLDF1130_gegl.JPG -- c2g radius=300 samples=4  
27,39s user 0,15s system 99% cpu 27,737 total

As you can see - converted picture from Gimp has better saturated colors than
the one from GEGL. For my eye is picture from Gimp better.

Can I ask you how to achieve the same result?

Attachments:
* http://www.gimpusers.com/system/attachments/461/original/res_WLDF1130.jpg
* http://www.gimpusers.com/system/attachments/462/original/res_WLDF1130P_gimp.jpg
* http://www.gimpusers.com/system/attachments/463/original/res_WLDF1130_gegl.JPG

--
waldauf (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GEGL - run C2g batch in command line

oneaty
Hello,

just small attempt to highlight this question... :]

--
waldauf (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GEGL - run C2g batch in command line

Partha Bagchi-2
I don't know what to tell you. :(

I loaded your original image in McGimp (my Mac GIMP build) and then used
the gegl command line with same parameters: rad = 300, samples = 4, iter =
10 and I got identical results.

$ date; gegl res_WLDF1130.jpg -o res_WLDF1130-GEGL-CLI.jpg  -- c2g
> radius=300 samples=4 iterations=10; date
> Sat Feb 11 22:59:19 EST 2017
> EEEEeEeek! 1 GeglBuffers leaked
> Sat Feb 11 22:59:21 EST 2017


On Fri, Feb 10, 2017 at 4:47 AM, waldauf <[hidden email]> wrote:

> Hello,
>
> just small attempt to highlight this question... :]
>
> --
> waldauf (via www.gimpusers.com/forums)
> _______________________________________________
> gimp-user-list mailing list
> List address:    [hidden email]
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
> List archives:   https://mail.gnome.org/archives/gimp-user-list
>
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GEGL - run C2g batch in command line

oneaty
>I don't know what to tell you. :(
>
>I loaded your original image in McGimp (my Mac GIMP build) and then
>used
>the gegl command line with same parameters: rad = 300, samples = 4,
>iter =
>10 and I got identical results.
>
>$ date; gegl res_WLDF1130.jpg -o res_WLDF1130-GEGL-CLI.jpg  -- c2g

I tried it again and have to say I overlooked this message. I got the same
error(?) message. :/

--
waldauf (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GEGL - run C2g batch in command line

Partha Bagchi-2
On Wed, Feb 22, 2017 at 3:15 AM, waldauf <[hidden email]> wrote:

> >I don't know what to tell you. :(
> >
> >I loaded your original image in McGimp (my Mac GIMP build) and then
> >used
> >the gegl command line with same parameters: rad = 300, samples = 4,
> >iter =
> >10 and I got identical results.
> >
> >$ date; gegl res_WLDF1130.jpg -o res_WLDF1130-GEGL-CLI.jpg  -- c2g
>
> I tried it again and have to say I overlooked this message. I got the same
> error(?) message. :/
>
What error message is that?
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GEGL - run C2g batch in command line

Owen Cook

> On Wed, Feb 22, 2017 at 3:15 AM, waldauf <[hidden email]> wrote:
>
> > >I don't know what to tell you. :(
> > >
> > >I loaded your original image in McGimp (my Mac GIMP build) and then
> > >used
> > >the gegl command line with same parameters: rad = 300, samples = 4,
> > >iter =
> > >10 and I got identical results.
> > >
> > >$ date; gegl res_WLDF1130.jpg -o res_WLDF1130-GEGL-CLI.jpg  -- c2g
> >
> > I tried it again and have to say I overlooked this message. I got the same
> > error(?) message. :/
> >


> What error message is that?


In my case

owen@CQ43 ~/Pictures $ date; ~/Gimp-GIT/bin/gegl IMG_1284.JPG -o res_WLDF1130-GEGL-CLI.jpg -- c2g
Thursday 23 February  11:08:06 AEDT 2017
EEEEeEeek! 1 GeglBuffers leaked



Owen
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GEGL - run C2g batch in command line

oneaty
In reply to this post by Partha Bagchi-2
>What error message is that?

In my case:
% time gegl res_WLDF1130.jpg -o res_WLDF1130_gegl.JPG -- c2g radius=300
samples=4 iterations=10
       EEEEeEeek! 1 GeglBuffers leaked

--
waldauf (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Loading...