It is currently Fri Apr 26, 2024 9:28 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: How to get gmic command line from Gimp interface ?
PostPosted: Fri Aug 22, 2014 7:58 am  (#1) 
Offline
GimpChat Member

Joined: Aug 22, 2014
Posts: 5
Hi !
I'm not very good at this command line stuff but i'd like to use it anyway with gimp's BIMP and gmic.
Now how to get the gmic command line with gmic plugin for gimp ?
I'm using gimp 2.8.10 (64bits) on Windows 7 (64bits), gmic version 1.6.0.0 (64bits)
I've tried the verbose (and the very verbose, and the debug) mode within the Gmic plugin, while running gimp from a "cmd" console with the parameter --verbose
And nothing works
Thank you for your attention !


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Fri Aug 22, 2014 8:08 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
gloq wrote:
Hi !
I'm not very good at this command line stuff but i'd like to use it anyway with gimp's BIMP and gmic.
Now how to get the gmic command line with gmic plugin for gimp ?
I'm using gimp 2.8.10 (64bits) on Windows 7 (64bits), gmic version 1.6.0.0 (64bits)
I've tried the verbose (and the very verbose, and the debug) mode within the Gmic plugin, while running gimp from a "cmd" console with the parameter --verbose
And nothing works
Thank you for your attention !


I believe you need the G'MIC stand alone program. You then use the command console with it.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Fri Aug 22, 2014 8:42 am  (#3) 
Offline
GimpChat Member

Joined: Aug 22, 2014
Posts: 5
Errr yes... but... there is no user interface in the G'mic stand alone (or is there ?), and i prefer not have to learn the command line mode. My question is howto gmic gimp-->gmic command line, not the opposite :)

Thank you anyway


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Fri Aug 22, 2014 9:04 am  (#4) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
A good place to start learning G'MIC command is with these G'MIC tutorials and G'MIC - tips and curiosities.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Fri Aug 22, 2014 9:28 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12518
The GIMP G'MIC inteface does allow for limited access to external commands (i.e., can run true 16-bit operations on external files) but does not provide a gui for that. Best just to use the stand-alone G'MIC if you need to process commands for higher bit images. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Fri Aug 22, 2014 10:36 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
An easy way to get the command line involved for a particular filter is to select 'Output mode -> New layer'.
Then, look at the layer name, it contains the G'MIC command that has been called to achieve the effect. You can copy/paste this into a call to the G'MIC plug-in API (for a scheme script for instance), as it is done there :

;;
;;   File        : gmic_in_script.scm
;;                 ( Scheme script for GIMP )
;;
;;   Description : Show how to call G'MIC commands from a GIMP script.
;;                 ( http://gmic.sourceforge.net )
;;
;;   Copyright   : David Tschumperle
;;                 ( http://tschumperle.users.greyc.fr/ )
;;
;;   License     : CeCILL v2.0
;;                 ( http://www.cecill.info/licences/Licence_CeCILL_V2-en.html )
;;
;;   This software is governed by the CeCILL  license under French law and
;;   abiding by the rules of distribution of free software.  You can  use,
;;   modify and/ or redistribute the software under the terms of the CeCILL
;;   license as circulated by CEA, CNRS and INRIA at the following URL
;;   "http://www.cecill.info".
;;
;;   As a counterpart to the access to the source code and  rights to copy,
;;   modify and redistribute granted by the license, users are provided only
;;   with a limited warranty  and the software's author,  the holder of the
;;   economic rights,  and the successive licensors  have only  limited
;;   liability.
;;
;;   In this respect, the user's attention is drawn to the risks associated
;;   with loading,  using,  modifying and/or developing or reproducing the
;;   software by the user in light of its specific status of free software,
;;   that may mean  that it is complicated to manipulate,  and  that  also
;;   therefore means  that it is reserved for developers  and  experienced
;;   professionals having in-depth computer knowledge. Users are therefore
;;   encouraged to load and test the software's suitability as regards their
;;   requirements in conditions enabling the security of their systems and/or
;;   data to be ensured and,  more generally, to use and operate it in the
;;   same conditions as regards security.
;;
;;   The fact that you are presently reading this means that you have had
;;   knowledge of the CeCILL license and that you accept its terms.
;;

(define   (script-with-gmic img drawable x y z)

  ;; Start undo group.
  (gimp-image-undo-group-start img)

  (let* (
         (copy-layer (car (gimp-layer-copy drawable TRUE)))
         )

    ;; Add a copy of the layer to the image.
    (gimp-image-add-layer img copy-layer -1)

    ;; Render a 3D mapped cube from the active layer, using G'MIC.
    (plug-in-gmic 1 img drawable 1
                  (string-append
                   "-v - " ; To have a silent output. Remove it to display errors from the G'MIC interpreter on stderr.
                   "-gimp_imageobject3d 1,{w},{h},0.5,"
                   (number->string x) ","
                   (number->string y) ","
                   (number->string z) ",45,0,0,-100,0.5,0.7,4"
                   ))

    ;; Merge two layers together, using the G'MIC 'edges' mode (this layer mode does not exist by default in GIMP).
    (plug-in-gmic 1 img drawable 2 "-v - -compose_edges 1")

    )

  ;; Flush display.
  (gimp-displays-flush)

  ;; End undo group.
  (gimp-image-undo-group-end img)
  )

(script-fu-register "script-with-gmic"
                    _"<Image>/Filters/G'MIC Script test..."
                    "Show how to call G'MIC from a GIMP script"
                    "David Tschumperlé"
                    "David Tschumperlé"
                    "October 2009"
                    "*"
                    SF-IMAGE      "Image"      0
                    SF-DRAWABLE         "Drawable"      0
                    SF-ADJUSTMENT   _"X-Angle"   '(57  0 360  1 2 0 0)
                    SF-ADJUSTMENT   _"Y-Angle"   '(41  0 360  1 2 0 0)
                    SF-ADJUSTMENT   _"Z-Angle"   '(21  0 360  1 2 0 0)
                    )


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Fri Aug 22, 2014 11:02 am  (#7) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
gloq wrote:
..I'm not very good at this command line stuff but i'd like to use it anyway with gimp's BIMP and gmic.
Now how to get the gmic command line with gmic plugin for gimp ?


Not all that sure of the benefits of running Gmic via BIMP

It does, (I am using BIMP 1.11 in a PClinuxOS 32 bit) pick up the Gmic Gimp plugin (1.6.0.0 linux 32) and a quick try with a simple command string (make an array) produces a result

Bimp looks like this
Image

Result looks like this.
Image


So it does work, but unless you are really duff (worse than not very good ;) ) at command line operations, then the stand-alone Gmic will be easier.

_________________
Image


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Sat Aug 23, 2014 2:14 am  (#8) 
Offline
GimpChat Member

Joined: Aug 22, 2014
Posts: 5
Thanks guys for you answers,
especially Ronounours who answered the question :hehe


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Sat Aug 23, 2014 3:07 am  (#9) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
The easiest way to get the command line is to use gmic and set output to new layer, when gmic finishes the name of the new layer is the command string

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Sat Aug 23, 2014 3:49 am  (#10) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
gloq wrote:
Thanks guys for you answers,
especially Ronounours who answered the question :hehe


Just for my info and going back to the first post

Quote:
..i'd like to use it anyway with gimp's BIMP and gmic...


Where exactly did you want BIMP to fit in?

_________________
Image


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Sat Aug 23, 2014 4:27 am  (#11) 
Offline
GimpChat Member

Joined: Aug 22, 2014
Posts: 5
Well my english is a bit awkward so I may not be perfectly understandable (is this sentence is ?)
I want to apply gmic effects to videos, so i decompose my videos in jpg images, want to batch those jpg, and then re-encode them.
As bimp wants line command to use gmic effects, I wanted a simple way to have those line commands :)


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Sat Aug 23, 2014 4:57 am  (#12) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
Curses, I had an little example of this on GimpTalk and just deleted the video a day ago, It applied the Gimp cubism filter to all the frames, using BIMP.

So that is possible. BIMP is easy, but a bit slow for this.
A batch file with standalone G'mic is going to be much faster.

Hope your project goes well.

_________________
Image


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Sat Aug 23, 2014 8:06 am  (#13) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
Just an update on speed, not as much difference as I thought there might be. A labour of love.
computer: oldish AMDx2 3 Ghz CPU 4 GB ram, PClinuuxOS 32 bit, g'mic-static 32 1.6.0.0

The video source is a BBC video, 720x406 25 fps clipped out 245 frames as jpg

BIMP using -gimp_ellipsionism 20,10,0,5,0.7,3,0.5,0
took 45 minutes to process the 245 frames.

Gmic-static in a bash file ( -ellipsionism 20,10,0,5,0.7,3,0.5,0) surprisingly took 40 minutes and produced large jpegs, I noticed the output quality was 100% so that is something to look out for.

A lot of computing for not an exciting 10 second clip.
http://youtu.be/79vJ3DCNF4A
must choose a better subject next time ;)

_________________
Image


Top
 Post subject: Re: How to get gmic command line from Gimp interface ?
PostPosted: Sat Aug 23, 2014 11:28 am  (#14) 
Offline
GimpChat Member

Joined: Aug 22, 2014
Posts: 5
Well thank you guys, but i have the answer i needed, Ronounours gave it !
It's slow indeed but it seems to work well
If I have some interesting results, i'll send them :)
Bye bye


Top
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts How do you run GIMP from the command line?

1

No new posts Attachment(s) G'MIC> Pattern> Strip command line?

2

No new posts GEGL command line and layer modes?

2

No new posts Calling GIMP Plug-in From Command Line - on Windows

0

No new posts Attachment(s) HELP - SEARCH AND RUN A COMMAND

6


cron

* Login  



Powered by phpBB3 © phpBB Group