It is currently Fri Aug 14, 2026 6:43 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: question (to David) concerning G'MIC "frame_fuzzy" filter
PostPosted: Tue Nov 11, 2014 8:42 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
Hi David,
following your indication, I started playing with the filter "frame_fuzzy".
Results are nice and very close to what I was expecting.
As with other filters, I started also trying to understand -step by step- the full logic of the filter (in order -maybe in a far future- to add some additional option).
Because I encountered a serious difficulty in understanding one piece of that code, I like to share with you my (very close to the ground...) question/opinion.
I post here the full code, highlighting the ununderstood lines of code:
--------------------------------------------------------------------------------
-v - -to_rgba -repeat @# -l[$>] nm=@{0,n}
-i[0] ($1;$2) -*[0] 2 ($5^$6^$7^$8) -r[-1] [-2] 100%,100%
-rectangle[-1] 0,0,100%,@{0,1},1,1
-rectangle[-1] 0,0,@{0,0},100%,1,1
-rm[0] -shift[-1] -$1,-$2,0,0,2 -spread[-1] $3 -b[-1] $4 -_fade 50,80
-nm $nm,1 -endl -done -v +
---------------------------------------------------------------------------------
as you see, my problem is on the
- creation of an image (as 0) having two rows and one colum and with a grey level corresponding to the two parameters in input $1 and $2
- multiplication of those two values by 2
- finally removing that image

my question is: what is the goal of this image?
it seems not to enter at all in the rest of the logic (as I said, I express here my very basic opinions)
using the console, I:
1-first executed the filter fully (got the expected result)
2-then I removed the "highlighted" lines of code (got the same result)

When you will have 2 minutes, could you verify my doubts?
Thanks a lot!!!

_________________
"Where am I ?"


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: question (to David) concerning G'MIC "frame_fuzzy" filter
PostPosted: Tue Nov 11, 2014 11:15 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Hello dinasset.
Actually, this command '-frame_fuzzy' is one of the oldest command written, at a time where G'MIC had no mathematical expression evaluator.
This image [0] was then used to perform some arithmetic operations on the input arguments.
This is not needed anymore. A more 'modern' (and shorter) version of this command would be instead :

frame_fuzzy : -skip ${2=$1},${3=5},${4=1},${5=255},${6=$5},${7=$6},${8=255}
  -e[^-1] "Draw $1x$2 fuzzy frame on image$?, with fuzzyness $3, smoothness $4 and RGBA color ($5,$6,$7,$8)."
  -v - -to_rgba -repeat @# -l[$>]
    100%,100%,1,1,1 -rectangle[-1] $1,$2,{w-1-$1},{h-1-$2}
    -spread[-1] $3 -b[-1] $4 100%,100%,1,4 -fc[-1] ${5-8}
    -j[0] [2],0,0,0,0,1,[1] -k[0]
  -endl -done -v +


Top
 Post subject: Re: question (to David) concerning G'MIC "frame_fuzzy" filter
PostPosted: Tue Nov 11, 2014 11:35 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
thanks a lot, David!

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group