It is currently Sun Jul 21, 2024 6:20 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: where is the real the cpp source code.
PostPosted: Fri Feb 14, 2014 3:09 am  (#1) 
Offline
GimpChat Member

Joined: Feb 14, 2014
Posts: 5
I'm new user and also a developer of cpp.I briefly read the source code file download from sourceforge.I don't see any code about algorithm detail.
Is it in gmic_def.gmic?if gmic's main algorithm code are written in gmic_def.gmic, how could it be compiled ?
here is the src file structure.
| Cimg.h
| gmic.cpp
| gimc.h
| gmic_bashcompletion.sh
| gmic_def.gmic
| gmic_def.h
| gmic_gimp.cpp
| gmic_in_script.scm
| gmic_use_lib.cpp
| makefile


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: where is the real the cpp source code.
PostPosted: Fri Feb 14, 2014 4:30 am  (#2) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Hi songtzu

The code these days is hosted on git (see at the bottom of http://gmic.sourceforge.net/repository.shtml for details)
Most of the "native" algorithms are in Cimg.h and gmic.cpp, the gmic script level stuff is in the latest update file: http://gmic.sourceforge.net/update1583.gmic


Top
 Post subject: Re: where is the real the cpp source code.
PostPosted: Fri Feb 14, 2014 5:20 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
What specific feature of G'MIC you are looking for ?
Some commands are 'native' written in C++, most of them as a part of the CImg library.
Others are 'custom' commands, written in G'MIC language (and are then defined in file 'gmic_def.gmic').
Some custom commands are also defined in external sources, so maybe you need to look at another source as well.


Top
 Post subject: Re: where is the real the cpp source code.
PostPosted: Sun Feb 16, 2014 9:55 pm  (#4) 
Offline
GimpChat Member

Joined: Feb 14, 2014
Posts: 5
[quote="garagecoder"][/quote]
hi
I'm confused. Isn't file Cimg.h part of project Cimg?I saw it before
if the native algorithms codes are in Cimg.h, them what's the relationships between them?


Top
 Post subject: Re: where is the real the cpp source code.
PostPosted: Sun Feb 16, 2014 10:08 pm  (#5) 
Offline
GimpChat Member

Joined: Feb 14, 2014
Posts: 5
Ronounours wrote:
What specific feature of G'MIC you are looking for ?
Some commands are 'native' written in C++, most of them as a part of the CImg library.
Others are 'custom' commands, written in G'MIC language (and are then defined in file 'gmic_def.gmic').
Some custom commands are also defined in external sources, so maybe you need to look at another source as well.


I'm looking for algorithm code of filters in g'mic .But I don't know where to start. there is little information I could found through google.It's hard to tell what I want do. But I know the first step is compile the source code.


Top
 Post subject: Re: where is the real the cpp source code.
PostPosted: Mon Feb 17, 2014 1:58 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
songtzu wrote:
hi
I'm confused. Isn't file Cimg.h part of project Cimg?I saw it before
if the native algorithms codes are in Cimg.h, them what's the relationships between them?


G'MIC is primarily a higher-level interface to use all the features from CImg. But it does more as G'MIC defines also its own commands.
The main relationship between the two is quite simple : I'm the main author of both of them.


Top
 Post subject: Re: where is the real the cpp source code.
PostPosted: Mon Feb 17, 2014 3:46 am  (#7) 
Offline
GimpChat Member

Joined: Feb 14, 2014
Posts: 5
Ronounours wrote:
songtzu wrote:
hi
I'm confused. Isn't file Cimg.h part of project Cimg?I saw it before
if the native algorithms codes are in Cimg.h, them what's the relationships between them?


G'MIC is primarily a higher-level interface to use all the features from CImg. But it does more as G'MIC defines also its own commands.
The main relationship between the two is quite simple : I'm the main author of both of them.



does it mean that I gotta looking into Cimg project first?
thanks so much. It would be a lucky year (chinese new year).
my best wishes!


Top
 Post subject: Re: where is the real the cpp source code.
PostPosted: Mon Feb 17, 2014 6:14 am  (#8) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
It really depends what you are trying to do!

Assuming you want to fully understand the low level C++ algorithm behind a "native" G'MIC command, for example the "median blur" command, you would need to look at Cimg.h

But many of the algorithms can be understood from just looking at the latest G'MIC definitions update file (so long as you know G'MIC script).

Maybe if you explain what you want to do with it we might be able to help more :yup


Top
 Post subject: Re: where is the real the cpp source code.
PostPosted: Mon Feb 17, 2014 9:27 pm  (#9) 
Offline
GimpChat Member

Joined: Feb 14, 2014
Posts: 5
garagecoder wrote:
It really depends what you are trying to do!

Assuming you want to fully understand the low level C++ algorithm behind a "native" G'MIC command, for example the "median blur" command, you would need to look at Cimg.h

But many of the algorithms can be understood from just looking at the latest G'MIC definitions update file (so long as you know G'MIC script).

Maybe if you explain what you want to do with it we might be able to help more :yup


I need do some code transplantation. part of my project need function like "pencil portrait" and "watercolor". I don't understand how G'mic script compiled in a Cpp/C project. I need some time to read more related documents and code. It's a little difficult to use G'MIC project's source code(many other projects are written in pure std C/CPP)
Thanks for your Patient. Your reply helped me a lot.


Top
 Post subject: Re: where is the real the cpp source code.
PostPosted: Tue Feb 18, 2014 2:47 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Including pure G'MIC functionnalities into a C++ project is actually quite easy, since you can link your code with the libgmic.
There is a simple example of use available here :

https://sourceforge.net/p/gmic/source/c ... se_lib.cpp

Note that with this, you can call a G'MIC command from C++, just as you would be doing it using the command line interface 'gmic'.
So you don't have to care about how the filter you want to apply is coded, you just apply it.


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Kaleidoscope Plugin Source Code

1

No new posts Attachment(s) Source Code for all my GEGL Filters

35

No new posts Attachment(s) OOB real black

7

No new posts VS Code - configure linting for PythonFu

0

No new posts Attachment(s) Inserting pdb.python_gegl command in my code

21



* Login  



Powered by phpBB3 © phpBB Group