It is currently Wed Apr 26, 2017 2:37 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Sun Nov 20, 2016 11:09 pm  (#1) 
Offline
GimpChat Member

Joined: Dec 10, 2012
Posts: 32
I'm trying to install Crazy Hedcut, and it errors out on the anisotropic step.
I noticed that the name is actually Smooth [anisotropic] in 1.7.9.

Can I fix this in the py script? Using Gimp 2..8.18.
If so, I would appreciate some guidance, or any other solution.

Thanks in advance,

adam933


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: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 1:14 am  (#2) 
Offline
New Member

Joined: Nov 21, 2016
Posts: 2
I noticed that the name is actually Smooth [anisotropic].


Top
 Post subject: Re: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 1:24 am  (#3) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 5956
Location: roma, italy
Unfortunately G'MIC does not guaranty compatibility among releases even when the change is just done for (let me call this one) "aesthetical" reasons; in fact the name has changed but the use and the parameters are the same.
So please do the following:
1.open the python source
2.locate line 251
3.change it from
+"-gimp_anisotropic_smoothing 330,0.36,1,0.5,7.38,0.8,30,2,0,1,1,2,0,24,0")

to
+"-gimp_smooth_anisotropic 330,0.36,1,0.5,7.38,0.8,30,2,0,1,1,2,0,24,0")


But this is not the only change needed:
hence please:
4.locate line 268
5.change it from
+"-gimp_bilateral 10,12,2,2,0,24,0")

to
+"-gimp_smooth_bilateral 10,12,2,2,0,24,0")


Save/Close. Rerun the filter.

Thanks

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 2:06 am  (#4) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 5956
Location: roma, italy
if you feel uncomfortable editing the source by yourself, here the amended version
Attachment:
DIEGO_ARTISTIC_CrazyHedcut.zip [5.32 KiB]
Downloaded 34 times

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 2:24 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1583
dinasset, what you call "aesthetical", I call it "coherence".
Improving the coherence of a software, slightly, step by step, even by breaking some compatibility sometimes, ensures you don't end with a software like Windows, that is a nightmare for every user.


Top
 Post subject: Re: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 4:10 am  (#6) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 5956
Location: roma, italy
David, there is also another aspect of any software package: compatibility as much as possible (which someone may call also friendliness).
In this particular case, if you aimed to have a more "coherent" set of filters, so that all the smoothing filters start with the word "smooth", you could have guaranteed also the backward compatibility by creating an "equ" statement, such that the previous name was still accepted and automatically converted, given that the effects are the same.
Different views of the important characteristics of software packages....

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 4:31 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1583
"Compatibility as much as possible" is indeed not my primary goal, as you noticed.
I don't want to keep old bits of code, like a ball and chain for several years to come.
This is not a disrespect of users, or anything like that. I say it again, but the users of the plug-in *do not loose features*, as the concerned filters are still here for use.

I understand this can cause issues to developers of scripts though.
But, it's exactly like when I use the OpenCV library in my C++ code : when they decided to change the API a few years ago. I had to update my codebase to take these new modifications into account. I cannot complain. As a developer, when I use an external library, it's because it saves me a lot of time and efforts, so I accept the possible 'maintenance' work I have to do in my own code using these libraries. Yes, it's a bit of work, but it's still nothing compared to the entire coding of the functionalities provided by those external libraries.
As a script writer, you use the G'MIC plug-in as an external library, so you have to accept as well that there are risks of changes in the API.
That is particularly true for all G'MIC commands whose name starts with 'gimp_*', as I explained in a previous message, because those commands are intended to have a very versatile API : the filter can be updated, some parameters can be modified/added/removed.

In your particular case, if you would have used the more general '-smooth' command, you wouldn't have faced this issue. This command is a 'native' one and its API hasn't changed for years. That's the only thing I can ensure : a native command API won't be changed during the lifetime of one particular G'MIC version.
As I said, if you want to be sure you keep the API for a particular 'custom' command, then just copy/paste it into a .gmic file, and includes it when you invoke G'MIC (with command '-command your_file.gmic'). Thus, you become a maintainer of these new custom commands, and you decide if and when the API must change for these particular commands.


Top
 Post subject: Re: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 4:57 am  (#8) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 5956
Location: roma, italy
This script writer who was using G'MIC interface almost everywhere -hence promoting it- for a (long) while will change his (simple) mind...and forget it.
GMIC is great to be used interactively and fully supported in this use, as you explained, but is poor as far as the gimp interface is concerned IMHO, as you admitted ("compatibility as much as possible is indeed not my primary goal"): adieu to its rich library.

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 5:02 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1583
That's your choice, even if I'm sorry to read that.
Ensuring a stable API for G'MIC commands starting with 'gimp_' is really not possible from my side. The primary reason of the embedded update mechanism in the plug-in is exactly doing the contrary (breaking the API of these commands, by adding new options / improving a filter). Maintaining a stable API for these would mean no filter updates anymore, for anyone.

I'd recommend you look at the 'native' commands instead (like '-smooth') in the future, so you could keep writing your appreciated scripts that won't break after each filter update.


Top
 Post subject: Re: Smooth[anisotropic] in G'MIC 1.7.9
PostPosted: Mon Nov 21, 2016 2:22 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Mar 28, 2016
Posts: 202
Location: Netherlands
Dinasset, perhaps you can (try to) make/script filters for/in G'MIC? :bigthup


Top
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts A request to Modify Smooth [Anisotropic] default

3

No new posts GMIC Error with Anisotropic Smoothing - OS X Yosemite

12

No new posts MATLAB Implementation of Anisotropic Blur - Code at GitHub

3

No new posts Smooth filters errors

4

No new posts Attachment(s) smooth skin error

11



* Login  



Powered by phpBB3 © phpBB Group