It is currently Thu Jun 04, 2026 1:33 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 100 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Wed May 26, 2021 12:39 am  (#61) 
Offline
GimpChat Member
User avatar

Joined: Oct 06, 2010
Posts: 4050
I must say, after spending the whole day reading, dabbling, and tweaking with FINK, Homebrew, CMake, and shell scripts, MacPort came to the rescue on this 2013 iMac. My goal was to get this (bede2.10.py) up and running on a MacOS just so I could see how the bede plugin worked. Great, btw! I tossed in a bit of Hillustrative to enhance, (both plugins rely on G'MIC) and I just can't get enough of this cartoon effect. I'm flabbergasted at how well it works!

Image

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Wed May 26, 2021 5:37 am  (#62) 
Offline
GimpChat Member

Joined: Dec 19, 2018
Posts: 164
cli345 wrote:
Hello,

On some photos, I like when an emboss effect is applied after the "cartoon" effect.

Here is an example:
Attachment:
The attachment small_farm_k7862-1_bd_emboss2.jpg is no longer available

Enjoy!

Cli345,
This effect looks really cool.
Attachment:
ComicBookEmbosseffect.png
ComicBookEmbosseffect.png [ 4.81 MiB | Viewed 8039 times ]

Thanks for sharing the steps.


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Wed May 26, 2021 6:34 am  (#63) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1430
Location: FInland
That emboss looks cool and fun, nice result Krikor :bigthup


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Wed May 26, 2021 1:12 pm  (#64) 
Offline
GimpChat Member

Joined: Dec 19, 2018
Posts: 164
Nidhogg wrote:
That emboss looks cool and fun, nice result Krikor :bigthup

Thank you Nidhogg!
The merits are all of Cli345, which created the technique, the plugin and shared them with us, in addition to doing the same with the steps for the emboss associated with this plugin.

Many beautiful results displayed here on this thread, that of Mahvin (above) is a work of art!


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Wed May 26, 2021 3:04 pm  (#65) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 14006
Location: Spain, Aragón
:hi5 :bigthup Krikor, I like your creation a lot. It's great!

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Thu May 27, 2021 9:08 am  (#66) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1430
Location: FInland
Tried the emboss effect, saved all steps to presets. Bede rocks!

Attachment:
pexels-nubia-navarro-(nubikini)-386025.jpg
pexels-nubia-navarro-(nubikini)-386025.jpg [ 163.68 KiB | Viewed 7971 times ]


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Thu May 27, 2021 11:35 am  (#67) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 14006
Location: Spain, Aragón
Great! Nidhogg. :coolthup

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Sun Jun 06, 2021 8:29 am  (#68) 
Offline
GimpChat Member

Joined: Apr 09, 2018
Posts: 1888
Location: France
:wvy
Today this message:

Image

_________________
Les parfums, les couleurs et les sons se répondent.Baudelaire (Les fleurs du mal)
2.10.36/(Samj) Gimp 2.10.38 OS Windows 10 Home 64 bits


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Sun Jun 06, 2021 10:53 am  (#69) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2637
Location: Poland
This is probably a temporary bug with the number of parameters in the G'MIC for fx_curves_interactive - because running it gives an error.

Look here:
viewtopic.php?f=9&t=19420&p=264988#p264988

_________________
Image


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Sun Jun 06, 2021 11:24 am  (#70) 
Offline
GimpChat Member

Joined: Apr 09, 2018
Posts: 1888
Location: France
:tyspin MareroQ :hugme
I tested the modified version and no problem. :) :coolthup

_________________
Les parfums, les couleurs et les sons se répondent.Baudelaire (Les fleurs du mal)
2.10.36/(Samj) Gimp 2.10.38 OS Windows 10 Home 64 bits


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Tue Jun 08, 2021 1:05 pm  (#71) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Hello, :)

Thanks, rich2005, mahvin, Krikor, Nidhogg, Issabella, level_0, MareroQ for your very valuable feedbacks! :tyspin (particularly to MareroQ for the fix).

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Tue Jul 20, 2021 8:54 am  (#72) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Hello! :)

Here is a similar filter (photo to cartoon). It's not exactly the same effect.
Attachment:
apples_k7252-65_compGegl.jpg
apples_k7252-65_compGegl.jpg [ 389.26 KiB | Viewed 11604 times ]

It's not better but it's made entirely with "GEGL graph".

Enjoy! :)

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Sun Jul 25, 2021 9:21 am  (#73) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Hello! :)

It's just the "photo to cartoon" plugin ("Comic Book for 2.10") with an additional option: "Simplify".

If the "Simplify" option is 0, the plugin acts almost exactly according to the old behavior. If it's 1, a slight simplification is applied. For 2, a stronger one is applied.

Attachment:
small_farm_k7862-1_versions.jpg
small_farm_k7862-1_versions.jpg [ 330.06 KiB | Viewed 10958 times ]

EDIT: The new version appears as "Filters -> Artistic -> Simple Cartoon..."
Enjoy! :)


Attachments:
bede2.10_simpl.zip [1.79 KiB]
Downloaded 317 times

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin
Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Tue Jul 27, 2021 9:35 am  (#74) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Hello! :)

Here is a very similar plugin written entirely in G'MIC.

#@gui ____<b>Testing</b>
#@gui <i>cli345</i>
#------------------
#@gui Comic book: comic, comic_preview(0)
#@gui : note = note("<b>Note</b>: Photo to cartoon")
#@gui : sep = separator()
#@gui : note = note(" ")
#@gui : Simplification = choice(0, "none", "light", "light antialias", "strong antialias", "median", "iuwt", "thin brush")
#@gui : sep = separator()
#@gui : Flattening for edge (bilateral) = int(2,0,5)
#@gui : Edge method = choice(0, "Diff. of Gauss.", "Diff. of BoxBlur", "Diff. of Median")
#@gui : Edge desaturation method = choice(1, "Lightness", "MaxRGB", "MinRGB")
#@gui : Line thickness = float(1,0.5,2)
#@gui : Line strength = float(15,0,19)
#@gui : sep = separator()
#@gui : Add colors = bool(1)
#@gui : Luminosity increase = int(10,0,50)
#@gui : Saturation increase = int(20,0,50)
#@gui : sep = separator()
#@gui : Final flattening (bilateral) = int(6,0,10)
#@gui : Lines antialias = int(15,0,100)
#@gui : sep = separator()
#@gui : Colors to black or white = bool(0)

comic :
   simplif=$1
   nbBilatBord=$2
   methBord=$3
   methDesat=$4
   lineThick=$5
   forceTrait=$6
   addColors=$7
   augmLum=$8
   augmSat=$9
   nbBilatFin=$10
   antialias=$11
   bw=$12
   
   if $simplif==2
      fx_smooth_antialias. 100,0,2.5,0,50,50
   elif $simplif==3
      fx_smooth_antialias. 100,0,5,0,50,50
   elif $simplif==4
      fx_smooth_median. 3,255,0,0,50,50
   elif $simplif==5
      jeje_denoise_iuwt. 3,4,2,0
      jeje_denoise_iuwt. 3,4,2,0
   elif $simplif==6
      fx_smooth_anisotropic. 60,0.9,0.64,3.1,1.1,0.8,30,2,0,1,1,0,0,24
   fi
   
   +fx_curves_interactive.  7,0,1,7,0,0,{50-$augmLum},{50+$augmLum},100,100,-1,0,0,{50-$augmSat},{50+$augmSat},100,100,-1,0,0,100,100,-1,0,0,100,100,-1,
   fx_smooth_nlmeans.. 4,4,10,5,0,0,24,0
   fx_smooth_bilateral.. 10,7,$nbBilatBord,0,0
   
   +cut.. 0,255
   reverse[-2,-1]
   if $methBord==0
      blur[-3] {$lineThick}
   elif $methBord==1
      boxfilter[-3] xy,{$lineThick+0.01}
   elif $methBord==2
      median[-3] {($lineThick+0.01)*2}
   fi
   sub[-3,-2]
   
   if $methDesat==0
      fill.. "m = min(R,G,B); M = max(R,G,B); L = 0.5*(m + M); [L, L, L]"
   elif $methDesat==1
      fill.. "M = max(R,G,B); [M, M, M]"
   elif $methDesat==2
      fill.. "M = min(R,G,B); [M, M, M]"
   fi

   cut.. 0,255 n.. 0,255
   negate..
   threshold.. {$forceTrait+80}%
   n.. 0,255
   
   if $simplif>0
      fx_smooth_antialias.. 100,0,2.5,0,50,50
      fx_curves_interactive.. 7,0,1,7,0,0,69,0,70,100,100,100,-1,0,0,100,0,-1,0,0,100,100,-1,0,0,100,100,-1,
   fi
   
   fx_smooth_antialias.. $antialias,0,1,0,50,50
   
   if $addColors==1
      mul[-2,-1]
      n. 0,255
      fx_smooth_bilateral. 10,7,$nbBilatFin,0,0
      if $bw==1
         fx_curves_interactive 7,0,1,7,0,0,16,100,100,100,-1,0,0,100,0,-1,0,0,100,100,-1,0,0,100,100,-1,
      fi
   else
      remove[-1]
   fi

comic_preview :
   comic $*

Installation:
  • Copy the above code into a file "~/.gmic" on Linux or a file "%APPDATA%\gmic""%APPDATA%\user.gmic" on Windows.
  • The "plug-in" appears in "Filters -> G'MIC-Qt -> Testing -> cli345 -> Comic Book".

Here is a comparison with "Comic Book for 2.10":
Attachment:
apples_k7252-65_compGmic.jpg
apples_k7252-65_compGmic.jpg [ 394.99 KiB | Viewed 10422 times ]

Here are some options of this version ("Comic Book" - G'MIC):
Attachment:
apples_k7252-65_gmicOptions.jpg
apples_k7252-65_gmicOptions.jpg [ 451.63 KiB | Viewed 10422 times ]

Attachment:
apples_k7252-65_gmicOptions2.jpg
apples_k7252-65_gmicOptions2.jpg [ 577.3 KiB | Viewed 10422 times ]

On my PC, with this file, this G'MIC version was faster than the "Comic Book for 2.10" filter.

Have fun! :)

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Last edited by cli345 on Sat Aug 07, 2021 3:46 pm, edited 2 times in total.

Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Tue Jul 27, 2021 12:35 pm  (#75) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2599
In Windows it is "%APPDATA%\user.gmic"

Now that gmic_gimp_qt stable is now 2.9.8 you might want to look at the changes in the syntax again. As commented on pixlus.
I have been using 2.9.8 for some time now so my bede_cartoon.py script already modified.
    #pdb.plug_in_gmic_qt(img, layer, 1, 0, '-fx_curves_interactive 7,0,1,7,0,0,'+pointLum+',100,100,-1,0,0,'+pointSat+',100,100,-1,0,0,100,100,-1,0,0,100,100,-1,')
    pdb.plug_in_gmic_qt(img, layer, 1, 0, 'fx_curves_interactive 7,0,1,"7","0,0,'+pointLum+',100,100,-1,0,0,'+pointSat+',100,100,-1,0,0,100,100,-1,0,0,100,100,-1"')

The .gmic file, well I got that going with some nested quotes
+fx_curves_interactive.  7,0,1,"7","0,0,{'50-$augmLum'},{'50+$augmLum'},100,100,-1,0,0,{'50-$augmSat'},{'50+$augmSat'},100,100,-1,0,0,100,100,-1,0,0,100,100,-1"

....but the simplify variable can throw up an out of range error ;) beyond my pay-grade.


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Wed Jul 28, 2021 9:55 am  (#76) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
:) Thank you very much, rich2005! :tyspin

Indeed, I haven't seen that G'MIC stable version has become "2.9.8" for 11 days!
Now, I've upgraded to 2.9.8 and clicked on "Update Filters" button. :)

Here is the fixed (for G'MIC 2.9.8 only) version:
#@gui ____<b>Testing</b>
#@gui <i>cli345</i>
#------------------
#@gui Comic book: comic, comic_preview(0)
#@gui : note = note("<b>Note</b>: Photo to cartoon")
#@gui : sep = separator()
#@gui : note = note(" ")
#@gui : Simplification = choice(0, "none", "light", "light antialias", "strong antialias", "median", "iuwt", "thin brush")
#@gui : sep = separator()
#@gui : note = note("<b>For edges:</b>")
#@gui : Flattening for edge (bilateral) = int(2,0,5)
#@gui : Edge method = choice(0, "Diff. of Gauss.", "Diff. of BoxBlur", "Diff. of Median")
#@gui : Edge desaturation method = choice(1, "Lightness", "MaxRGB", "MinRGB")
#@gui : Line thickness = float(1,0.5,2)
#@gui : Line strength = float(15,0,19)
#@gui : sep = separator()
#@gui : Add colors = bool(1)
#@gui : note = note("<b>For colors:</b>")
#@gui : Luminosity increase = int(10,0,50)
#@gui : Saturation increase = int(20,0,50)
#@gui : Final flattening (bilateral) = int(6,0,10)
#@gui : Lines antialias = int(15,0,100)
#@gui : Colors to black or white = bool(0)
#@gui : sep = separator()
#@gui : url = link("Filter discussed here","http://gimpchat.com/viewtopic.php?f=11&t=19335&p=266517#p266512")

comic :
   simplif=$1
   nbBilatBord=$2
   methBord=$3
   methDesat=$4
   lineThick=$5
   forceTrait=$6
   addColors=$7
   augmLum=$8
   augmSat=$9
   nbBilatFin=$10
   antialias=$11
   bw=$12
   
   if $simplif==2
      fx_smooth_antialias. 100,0,2.5,0,50,50
   elif $simplif==3
      fx_smooth_antialias. 100,0,5,0,50,50
   elif $simplif==4
      fx_smooth_median. 3,255,0,0,50,50
   elif $simplif==5
      jeje_denoise_iuwt. 3,4,2,0
      jeje_denoise_iuwt. 3,4,2,0
   elif $simplif==6
      fx_smooth_anisotropic. 60,0.9,0.64,3.1,1.1,0.8,30,2,0,1,1,0,0,24
   fi
   
   curv="0,0,"{50-$augmLum}","{50+$augmLum}",100,100,-1,0,0,"{50-$augmSat}","{50+$augmSat}",100,100,-1,0,0,100,100,-1,0,0,100,100,-1"
   +fx_curves_interactive.  7,0,1,"7",$curv
   fx_smooth_nlmeans.. 4,4,10,5,0,0,24,0
   fx_smooth_bilateral.. 10,7,$nbBilatBord,0,0
   
   +cut.. 0,255
   reverse[-2,-1]
   if $methBord==0
      blur[-3] {$lineThick}
   elif $methBord==1
      boxfilter[-3] xy,{$lineThick+0.01}
   elif $methBord==2
      median[-3] {($lineThick+0.01)*2}
   fi
   sub[-3,-2]
   
   if $methDesat==0
      fill.. "m = min(R,G,B); M = max(R,G,B); L = 0.5*(m + M); [L, L, L]"
   elif $methDesat==1
      fill.. "M = max(R,G,B); [M, M, M]"
   elif $methDesat==2
      fill.. "M = min(R,G,B); [M, M, M]"
   fi

   cut.. 0,255 n.. 0,255
   negate..
   threshold.. {$forceTrait+80}%
   n.. 0,255
   
   if $simplif>0
      fx_smooth_antialias.. 100,0,2.5,0,50,50
      fx_curves_interactive.. 7,0,1,"7","0,0,69,0,70,100,100,100,-1,0,0,100,0,-1,0,0,100,100,-1,0,0,100,100,-1"
   fi
   
   fx_smooth_antialias.. $antialias,0,1,0,50,50
   
   if $addColors==1
      mul[-2,-1]
      n. 0,255
      fx_smooth_bilateral. 10,7,$nbBilatFin,0,0
      if $bw==1
         fx_curves_interactive 7,0,1,"7","0,0,16,100,100,100,-1,0,0,100,0,-1,0,0,100,100,-1,0,0,100,100,-1"
      fi
   else
      remove[-1]
   fi

comic_preview :
   comic $*

EDIT: Now, you can just type "Ctrl-R" on G'MIC window and the "plug-in" appears in "Filters -> G'MIC-Qt -> Artistic -> Comic Book" (for G'MIC 2.9.8 only).



Here is the fixed (for G'MIC 2.9.8 only) "Simple cartoon" plug-in:


Attachments:
bede2.10_simpl2.9.8.zip [1.81 KiB]
Downloaded 236 times

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Last edited by cli345 on Sun Aug 01, 2021 9:07 am, edited 1 time in total.
Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Wed Jul 28, 2021 10:05 am  (#77) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2599
The .gmic code is quick and gives a really good result.
The frequent updating of the gmic syntax is understandable - gmic is work-in-progress but frequently results in filters breaking.

(Using a 2.10.22 appimage and a gmic_gimp_qt 2.9.8 plugin that I compile for it.)


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Fri Jul 30, 2021 9:46 am  (#78) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Thanks, rich2005!

Here is the fixed (for G'MIC 2.9.8 only) "groove" plug-in:


Attachments:
groove2.9.8.zip [1.24 KiB]
Downloaded 255 times

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin
Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Sun Aug 01, 2021 8:53 am  (#79) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Thanks to Michael for his video (in German)! :tyspin

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: Results of my "photo to cartoon" plugin
PostPosted: Sat Aug 07, 2021 3:50 pm  (#80) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Hello! :)

If you have Gimp 2.8 + G'MIC 1.7.9, you can install this version of the G'MIC plug-in:
(for G'MIC 1.7.9 only)

#@gimp ____<b>Artistic</b>
#------------------
#@gimp Comic Book: comicprev, comicprev_preview(0)
#@gimp : note = note("<b>Note</b>: Photo to cartoon")
#@gimp : sep = separator()
#@gimp : note = note(" ")
#@gimp : Simplification = choice(0, "None", "Light", "Light Antialias", "Strong Antialias", "Median", "Iuwt", "Thin Brush")
#@gimp : sep = separator()
#@gimp : note = note("<b>For edges:</b>")
#@gimp : Flattening for Edge (bilateral) = int(2,0,5)
#@gimp : Edge Method = choice(0, "Diff. of Gauss.", "Diff. of BoxBlur", "Diff. of Median")
#@gimp : Edge Desaturation Method = choice(1, "Lightness", "MaxRGB", "MinRGB")
#@gimp : Line Thickness = float(1,0.5,2)
#@gimp : Line Strength = float(15,0,19)
#@gimp : sep = separator()
#@gimp : Add Colors = bool(1)
#@gimp : note = note("<b>For colors:</b>")
#@gimp : Luminosity Increase = int(10,0,50)
#@gimp : Saturation Increase = int(20,0,50)
#@gimp : Final Flattening (bilateral) = int(6,0,10)
#@gimp : Lines Antialias = int(15,0,100)
#@gimp : Colors to Black or White = bool(0)
#@gimp : sep = separator()
#@gimp : Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate top","Duplicate left","Duplicate bottom","Duplicate right")
#@gimp : sep = separator()
#@gimp : url = link("Filter discussed here","http://gimpchat.com/viewtopic.php?f=11&t=19335&p=266517#p266512")
#@gimp : note = note("<small>Author: <i>Claude Lion</i>.      Latest Update: <i>2021/08/07</i>.</small>")
comicprev :
   -repeat $! -l[$>]

   simplif=$1
   nbBilatBord=$2
   methBord=$3
   methDesat=$4
   lineThick=$5
   forceTrait=$6
   addColors=$7
   augmLum=$8
   augmSat=$9
   nbBilatFin=$10
   antialias=$11
   bw=$12

   -if {$simplif==2}
      -gimp_smooth_antialias. 100,0,2.5,0,50,50
   -elif {$simplif==3}
      -gimp_smooth_antialias. 100,0,5,0,50,50
   -elif {$simplif==4}
      -gimp_smooth_median. 3,255,0,0,50,50
   -elif {$simplif==5}
      -jeje_denoise_iuwt. 3,4,2,0
      -jeje_denoise_iuwt. 3,4,2,0
   -elif {$simplif==6}
      -gimp_smooth_anisotropic. 60,0.9,0.64,3.1,1.1,0.8,30,2,0,1,1,0,0,24
   -endif
   

   curv="0,0,"{50-$augmLum}","{50+$augmLum}",100,100,-1,0,0,"{50-$augmSat}","{50+$augmSat}",100,100,-1,0,0,100,100,-1,0,0,100,100,-1"
   --gimp_curves_interactive.  7,0,1,"7",$curv
   -gimp_smooth_nlmeans.. 4,4,10,5,0,0,24,0
   -gimp_smooth_bilateral.. 10,7,$nbBilatBord,0,0

   --cut.. 0,255
   -reverse[-2,-1]
   -if {$methBord==0}
      -blur[-3] {$lineThick}
   -elif {$methBord==1}
      -boxfilter[-3] xy,{$lineThick+0.01}
   -elif {$methBord==2}
      -median[-3] {($lineThick+0.01)*2}
   -endif
   -sub[-3,-2]

   -if {$methDesat==0}
      -fill.. "m = min(R,G,B); M = max(R,G,B); L = 0.5*(m + M); [L, L, L]"
   -elif {$methDesat==1}
      -fill.. "M = max(R,G,B); [M, M, M]"
   -elif {$methDesat==2}
      -fill.. "M = min(R,G,B); [M, M, M]"
   -endif

   -cut.. 0,255 -n.. 0,255
   -negate..
   -threshold.. {$forceTrait+80}%
   -n.. 0,255

   -if {$simplif>0}
      -gimp_smooth_antialias.. 100,0,2.5,0,50,50
      -gimp_curves_interactive.. 7,0,1,"7","0,0,69,0,70,100,100,100,-1,0,0,100,0,-1,0,0,100,100,-1,0,0,100,100,-1"
   -endif

   -gimp_smooth_antialias.. $antialias,0,1,0,50,50

   -if $addColors
      -mul[-2,-1]
      -n. 0,255
      -gimp_smooth_bilateral. 10,7,$nbBilatFin,0,0
      -if $bw
         -gimp_curves_interactive 7,0,1,"7","0,0,16,100,100,100,-1,0,0,100,0,-1,0,0,100,100,-1,0,0,100,100,-1"
      -endif
   -else
      -remove[-1]
   -endif

   -endl -done

comicprev_preview :
  -gimp_split_preview "-comicprev $*",$-1

Installation:
  • Copy the above code into a file "~/.gmic" on Linux or a file "%APPDATA%\user.gmic" on Windows.
  • The "plug-in" appears in "Filters -> G'MIC -> Artistic -> Comic Book".

Have fun! :)

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
Post new topic Reply to topic  [ 100 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group