It is currently Mon Jun 22, 2026 1:11 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Saturation filter
PostPosted: Tue Jul 29, 2014 12:54 am  (#21) 
Offline
GimpChat Member

Joined: Feb 08, 2014
Posts: 26
Thank you! :tyspin


Top
 Post subject: Re: Saturation filter
PostPosted: Mon Sep 08, 2014 11:14 am  (#22) 
Offline
GimpChat Member

Joined: Feb 08, 2014
Posts: 26
Hi

I have made some more changes in the main routine of the filter, I added chroma noise reduction and sharpening and also renewed the filter description.

Thank you!

#@gimp Color grading : jl_colorgrading, jl_colorgrading_preview
#@gimp : Note = note("A filter for basic photo editing and color grading.")
#@gimp : Note = note("<small><b>Note:</b> Saturation channel gamma affects more the less saturated areas. Saturation channel gamma may introduce artifacts depending on the image. S-curve contrast, affects shadows and highlights equally. Clarity, Local Contrast and Tone Mapping offer somewhat similar effect, use with care when more than one is active. When using noise reduction or sharpening tools, zoom in for more accurate view.</small>")
#@gimp : Sep = separator()
#@gimp : Cool / warm = int(0,-50,50)
#@gimp : Saturation = float(1,0,2)
#@gimp : Saturation channel gamma = float(1,0.1,3)
#@gimp : Sep = separator()
#@gimp : S-curve contrast = int(0,-30,30)
#@gimp : Shadows = int(0,-50,50)
#@gimp : Highlights = int(0,-50,50)
#@gimp : Blacks = int(0,0,50)
#@gimp : Brightness = int(0,-50,50)
#@gimp : Contrast = int(0,-50,50)
#@gimp : Gamma = float(1,0.1,3)
#@gimp : Sep = separator()
#@gimp : Clarity = float(0,0.0,2.0)
#@gimp : Local contrast enhance = float(0,0,3)
#@gimp : Tone map = bool(0)
#@gimp : Tone map strength = float(0.75,0.55,1)
#@gimp : Sep = separator()
#@gimp : Color grading = bool(0)
#@gimp : Highlights color intensity = int(70,0,130)
#@gimp : Highlights hue = int(0,0,360)
#@gimp : Highlights brightness = int(0,-100,100)
#@gimp : Midtones color intensity = int(0,0,130)
#@gimp : Midtones hue = int(0,0,360)
#@gimp : Midtones brightness = int(0,-100,100)
#@gimp : Shadows color intensity = int(70,0,130)
#@gimp : Shadows hue shift = int(180,0,360)
#@gimp : Shadows brightness = int(0,-100,100)
#@gimp : Sep = separator()
#@gimp : Output saturation = float(1,0,2)
#@gimp : Output sharpening = float(0,0,10)
#@gimp : Output chroma nr = float(0,0,20)
#@gimp : Sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate horizontal","Duplicate vertical")
#@gimp : Sep = separator(), note = note("<small>Author: <i>John Lakkas</i>.      Latest update: <i>2014/09/07</i>.</small>")
jl_colorgrading :
  _ystr=""

  # COLOR MANIPULATION

  # COOL / WARM filter
  -if {$1>0}
  _mymin={$1}
  _mymax={255-$1}
  -apply_channels "-apply_curve 0,0,$_mymin,255,255",6,0
  -apply_channels "-apply_curve 0,0,0,255,$_mymax",5,0
  -endif
  -if {$1<0}
  _mymin={-$1}
  _mymax={255+$1}
  -apply_channels "-apply_curve 0,0,$_mymin,255,255",5,0
  -apply_channels "-apply_curve 0,0,0,255,$_mymax",6,0
  -endif

  # HSV SATURATION (linear)
  -if {$2!=1.0}
    -gimp_equalize_s $2,0
  -endif

  # HSV SATURATION (gamma)
  -if {$3!=1.0}
  -apply_channels "-apply_gamma $3",12,0
  -endif

  # VALUE MANIPULATION

  # S CURVE
  -if {$4!=0}
  _p1={64-$4}
  _p2={192+$4}
  _ystr=$_ystr" -apply_curve 1,0,0,64,$_p1,192,$_p2,255,255"
  -endif

  # SHADOWS
  -if {$5!=0}
  _p3={64-$5}
  _ystr=$_ystr" -apply_curve 1,0,0,64,$_p3,128,128,192,192,255,255"
  -endif

  # HIGHLIGHTS
  -if {$6!=0}
  _p4={192+$6}
  _ystr=$_ystr" -apply_curve 1,0,0,64,64,128,128,192,$_p4,255,255"
  -endif

  # BLACKS
  -if {$7>0}
  _ystr=$_ystr" -apply_curve 1,$7,0,64,64,255,255"
  -endif

  # BRIGHTNESS
  -if {$8>0}
  _p5=0
  _ystr=$_ystr" -apply_curve 0,0,$8,255,255"
  -endif
  -if {$8<0}
  _p5={255+$8}
  _ystr=$_ystr" -apply_curve 0,0,0,255,$_p5"
  -endif

  # CONTRAST
  -if {$9>0}
  _p6=$9
  _p7={255-$9}
  _ystr=$_ystr" -apply_curve 0,0,0,$_p6,0,$_p7,255,255,255"
  -endif
  -if {$9<0}
  _p6={-$9}
  _p7={255+$9}
  _ystr=$_ystr" -apply_curve 0,0,$_p6,255,$_p7"
  -endif

  # GAMMA
  -if {$10!=1.0}
  _ystr=$_ystr" -apply_gamma $10"
  -endif

  # APPLY VALUE PROCESSING
  -if {$_ystr'!='""}
  -apply_channels $_ystr,13,0
  -endif

  # CLARITY (midtones unsharp mask)
  -if {$11>0}
  -to_rgb --rgb2hsl -split[-1] c -rm[-2] -rm[-2] -*[-1] 255 -apply_curve[-1] 1,0,0,63,0,127,255,192,0,255,0 --unsharp[0] 150,$11,0 -cut[-1] 0,255 -cut[-2] 0,255 -reverse[-1,-2] -append[-1,-2] c -blend alpha
  -endif

   # LOCAL CONTRAST (unsharp mask)
  -if {$12>0}
  -unsharp 20,$12,0
  -cut[-1] 0,255
  -endif

  # TONE MAPPING
  -if {$13}
  -map_tones 0.5,$14,0.1,30
  -endif

  # COLOR GRADING STEP
  -if {$15}
    -if {$17+$23>360}
      _shh={($17+$23-360)/360}
    -else
      _shh={($17+$23)/360}
    -endif
    _shs={$22/100}
    _shlev={$24}
    _midh={$20/360}
    _mids={$19/100}
    _midlev={$21}
    _highh={$17/360}
    _highs={$16/100}
    _highlev={$18}
    _satlev={$25}

    -color_grade $_shh,$_shs,$_shlev,$_midh,$_mids,$_midlev,$_highh,$_highs,$_highlev,$_satlev
  -endif
 
  # HSV SATURATION (linear)
  -if {$25!=1.0}
    -gimp_equalize_s $25,0
  -endif
 
  # USM
  -if {$26>0}
    -unsharp 0.5,$26
    -cut 0,255
  -endif
 
  # CHROMA NR
  -if {$27>0}
    -apply_channels "-denoise_haar $27",5,0
    -apply_channels "-denoise_haar $27",6,0
  -endif
   


Top
 Post subject: Re: Saturation filter
PostPosted: Tue Sep 09, 2014 2:20 pm  (#23) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Should be updated now, thanks !


Top
 Post subject: Re: Saturation filter
PostPosted: Tue Mar 17, 2015 5:02 am  (#24) 
Offline
GimpChat Member

Joined: Feb 08, 2014
Posts: 26
Hi!

I have made some changes in Color Grading filter, added HDR effect and removed old tonemapping options. Most routines now use percentages in dimensions so the preview resembles better the final view. Also the descriptions where updated to be somewhat more detailed and insightful. Below I post the original main routine of the filter and the updated.

Thank you!

The original:
#@gimp Color grading : jl_colorgrading, jl_colorgrading_preview
#@gimp : Note = note("A filter for basic photo editing and color grading.")
#@gimp : Note = note("<small><b>Note:</b> Saturation channel gamma affects more the less saturated areas. Saturation channel gamma may introduce artifacts depending on the image. S-curve contrast, affects shadows and highlights equally. Clarity, Local Contrast and Tone Mapping offer somewhat similar effect, use with care when more than one is active. When using noise reduction or sharpening tools, zoom in for more accurate view.</small>")
#@gimp : Sep = separator()
#@gimp : Cool / warm = int(0,-50,50)
#@gimp : Saturation = float(1,0,2)
#@gimp : Saturation channel gamma = float(1,0.1,3)
#@gimp : Sep = separator()
#@gimp : S-curve contrast = int(0,-30,30)
#@gimp : Shadows = int(0,-50,50)
#@gimp : Highlights = int(0,-50,50)
#@gimp : Blacks = int(0,0,50)
#@gimp : Brightness = int(0,-50,50)
#@gimp : Contrast = int(0,-50,50)
#@gimp : Gamma = float(1,0.1,3)
#@gimp : Sep = separator()
#@gimp : Clarity = float(0,0.0,2.0)
#@gimp : Local contrast enhance = float(0,0,3)
#@gimp : Tone map = bool(0)
#@gimp : Tone map strength = float(0.75,0.55,1)
#@gimp : Sep = separator()
#@gimp : Color grading = bool(0)
#@gimp : Highlights color intensity = int(70,0,130)
#@gimp : Highlights hue = int(0,0,360)
#@gimp : Highlights brightness = int(0,-100,100)
#@gimp : Midtones color intensity = int(0,0,130)
#@gimp : Midtones hue = int(0,0,360)
#@gimp : Midtones brightness = int(0,-100,100)
#@gimp : Shadows color intensity = int(70,0,130)
#@gimp : Shadows hue shift = int(180,0,360)
#@gimp : Shadows brightness = int(0,-100,100)
#@gimp : Sep = separator()
#@gimp : Output saturation = float(1,0,2)
#@gimp : Output sharpening = float(0,0,10)
#@gimp : Output chroma nr = float(0,0,20)
#@gimp : Sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate horizontal","Duplicate vertical")
#@gimp : Sep = separator(), note = note("<small>Author: <i>John Lakkas</i>.      Latest update: <i>09/07/2014</i>.</small>")
jl_colorgrading :
  _ystr=""
  # COLOR MANIPULATION
  # COOL / WARM filter
  -if {$1>0}
  _mymin={$1}
  _mymax={255-$1}
  -apply_channels_old "-apply_curve 0,0,$_mymin,255,255",6,0
  -apply_channels_old "-apply_curve 0,0,0,255,$_mymax",5,0
  -endif
  -if {$1<0}
  _mymin={-$1}
  _mymax={255+$1}
  -apply_channels_old "-apply_curve 0,0,$_mymin,255,255",5,0
  -apply_channels_old "-apply_curve 0,0,0,255,$_mymax",6,0
  -endif
  # HSV SATURATION (linear)
  -if {$2!=1.0}
    -gimp_equalize_s $2,0
  -endif
  # HSV SATURATION (gamma)
  -if {$3!=1.0}
  -apply_channels_old "-apply_gamma $3",12,0
  -endif
  # VALUE MANIPULATION
  # S CURVE
  -if {$4!=0}
  _p1={64-$4}
  _p2={192+$4}
  _ystr=$_ystr" -apply_curve 1,0,0,64,$_p1,192,$_p2,255,255"
  -endif
  # SHADOWS
  -if {$5!=0}
  _p3={64-$5}
  _ystr=$_ystr" -apply_curve 1,0,0,64,$_p3,128,128,192,192,255,255"
  -endif
  # HIGHLIGHTS
  -if {$6!=0}
  _p4={192+$6}
  _ystr=$_ystr" -apply_curve 1,0,0,64,64,128,128,192,$_p4,255,255"
  -endif
  # BLACKS
  -if {$7>0}
  _ystr=$_ystr" -apply_curve 1,$7,0,64,64,255,255"
  -endif
  # BRIGHTNESS
  -if {$8>0}
  _p5=0
  _ystr=$_ystr" -apply_curve 0,0,$8,255,255"
  -endif
  -if {$8<0}
  _p5={255+$8}
  _ystr=$_ystr" -apply_curve 0,0,0,255,$_p5"
  -endif
  # CONTRAST
  -if {$9>0}
  _p6=$9
  _p7={255-$9}
  _ystr=$_ystr" -apply_curve 0,0,0,$_p6,0,$_p7,255,255,255"
  -endif
  -if {$9<0}
  _p6={-$9}
  _p7={255+$9}
  _ystr=$_ystr" -apply_curve 0,0,$_p6,255,$_p7"
  -endif
  # GAMMA
  -if {$10!=1.0}
  _ystr=$_ystr" -apply_gamma $10"
  -endif
  # APPLY VALUE PROCESSING
  -if {$_ystr'!='""}
  -apply_channels_old $_ystr,13,0
  -endif
  # CLARITY (midtones unsharp mask)
  -if {$11>0}
  -to_rgb --rgb2hsl -split[-1] c -rm[-2] -rm[-2] -*[-1] 255 -apply_curve[-1] 1,0,0,63,0,127,255,192,0,255,0 --unsharp[0] 150,$11,0 -cut[-1] 0,255 -cut[-2] 0,255 -reverse[-1,-2] -append[-1,-2] c -blend alpha
  -endif
   # LOCAL CONTRAST (unsharp mask)
  -if {$12>0}
  -unsharp 20,$12,0
  -cut[-1] 0,255
  -endif
  # TONE MAPPING
  -if {$13}
  -map_tones 0.5,$14,0.1,30
  -endif
  # COLOR GRADING STEP
  -if {$15}
    -if {$17+$23>360}
      _shh={($17+$23-360)/360}
    -else
      _shh={($17+$23)/360}
    -endif
    _shs={$22/100}
    _shlev={$24}
    _midh={$20/360}
    _mids={$19/100}
    _midlev={$21}
    _highh={$17/360}
    _highs={$16/100}
    _highlev={$18}
    _satlev={$25}
    -color_grade $_shh,$_shs,$_shlev,$_midh,$_mids,$_midlev,$_highh,$_highs,$_highlev,$_satlev
  -endif
  # HSV SATURATION (linear)
  -if {$25!=1.0}
    -gimp_equalize_s $25,0
  -endif
  # USM
  -if {$26>0}
    -unsharp 0.5,$26
    -cut 0,255
  -endif
  # CHROMA NR
  -if {$27>0}
    -apply_channels_old "-denoise_haar $27",5,0
    -apply_channels_old "-denoise_haar $27",6,0
  -endif



The update:
#@gimp Color grading : jl_colorgrading, jl_colorgrading_preview
#@gimp : Note = note("A filter for basic photo editing and color grading.")
#@gimp : Note = note("<small><b>Note:</b> Saturation channel gamma affects more the less saturated areas. S-curve contrast, affects shadows and highlights equally. When using noise reduction or sharpening tools, zoom in for more accurate view.</small>")
#@gimp : Sep = separator()
#@gimp : HDR effect (Tone map) = float(0.,0.0,1)
#@gimp : Cool / warm = int(0,-50,50)
#@gimp : Saturation = float(1,0,2)
#@gimp : Saturation channel gamma = float(1,0.1,3)
#@gimp : Note = note("<small><b>Note:</b> Saturation channel gamma may introduce artifacts depending on the image.</small>")
#@gimp : Sep = separator()
#@gimp : S-curve contrast = int(0,-30,30)
#@gimp : Shadows = int(0,-50,50)
#@gimp : Highlights = int(0,-50,50)
#@gimp : Blacks = int(0,0,50)
#@gimp : Brightness = int(0,-50,50)
#@gimp : Contrast = int(0,-50,50)
#@gimp : Gamma = float(1,0.1,3)
#@gimp : Sep = separator()
#@gimp : Clarity = float(0,0.0,2.0)
#@gimp : Local contrast enhance = float(0,0,3)
#@gimp : Sep = separator()
#@gimp : Color grading = bool(0)
#@gimp : Highlights color intensity = int(70,0,130)
#@gimp : Highlights hue = int(0,0,360)
#@gimp : Highlights brightness = int(0,-100,100)
#@gimp : Midtones color intensity = int(0,0,130)
#@gimp : Midtones hue = int(0,0,360)
#@gimp : Midtones brightness = int(0,-100,100)
#@gimp : Shadows color intensity = int(70,0,130)
#@gimp : Shadows hue shift = int(180,0,360)
#@gimp : Shadows brightness = int(0,-100,100)
#@gimp : Note = note("<small><b>Color grading subsection usage:</b> Use intensity sliders to control the amount of color being applied in the highlights/midtones/shadows, use brightness sliders for bringing up or down highlights/midtones/shadows. Hues here follow rotation axis in color wheel ie: 0 or 360 deg is red, 180 is blue it's complimentary. Shadows hue shift in default position uses always the complimentary color of highlights in the shadows. Default sliders for grading apply red highlights and blue shadows effect.</small>")
#@gimp : Sep = separator()
#@gimp : Output saturation = float(1,0,2)
#@gimp : Output sharpening = float(0,0,10)
#@gimp : Output chroma nr = float(0,0,20)
#@gimp : Sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate horizontal","Duplicate vertical")
#@gimp : Sep = separator(), note = note("<small>Author: <i>John Lakkas</i>.      Latest update: <i>17/03/2015</i>.</small>")
jl_colorgrading :
  -if {$1>0.01}
    -map_tones_fast 5%,$1
  -endif
  _ystr=""
  # COLOR MANIPULATION
  # COOL / WARM filter
  -if {$2>0}
  _mymin={$2}
  _mymax={255-$2}
  -apply_channels_old "-apply_curve 0,0,$_mymin,255,255",6,0
  -apply_channels_old "-apply_curve 0,0,0,255,$_mymax",5,0
  -endif
  -if {$2<0}
  _mymin={-$2}
  _mymax={255+$2}
  -apply_channels_old "-apply_curve 0,0,$_mymin,255,255",5,0
  -apply_channels_old "-apply_curve 0,0,0,255,$_mymax",6,0
  -endif
  # HSV SATURATION (linear)
  -if {$3!=1.0}
    -gimp_equalize_s $3,0
  -endif
  # HSV SATURATION (gamma)
  -if {$4!=1.0}
  -apply_channels_old "-apply_gamma $4",12,0
  -endif
  # VALUE MANIPULATION
  # S CURVE
  -if {$5!=0}
  _p1={64-$5}
  _p2={192+$5}
  _ystr=$_ystr" -apply_curve 1,0,0,64,$_p1,192,$_p2,255,255"
  -endif
  # SHADOWS
  -if {$6!=0}
  _p3={64-$6}
  _ystr=$_ystr" -apply_curve 1,0,0,64,$_p3,128,128,192,192,255,255"
  -endif
  # HIGHLIGHTS
  -if {$7!=0}
  _p4={192+$7}
  _ystr=$_ystr" -apply_curve 1,0,0,64,64,128,128,192,$_p4,255,255"
  -endif
  # BLACKS
  -if {$8>0}
  _ystr=$_ystr" -apply_curve 1,$8,0,64,64,255,255"
  -endif
  # BRIGHTNESS
  -if {$9>0}
  _p5=0
  _ystr=$_ystr" -apply_curve 0,0,$9,255,255"
  -endif
  -if {$9<0}
  _p5={255+$9}
  _ystr=$_ystr" -apply_curve 0,0,0,255,$_p5"
  -endif
  # CONTRAST
  -if {$10>0}
  _p6=$10
  _p7={255-$10}
  _ystr=$_ystr" -apply_curve 0,0,0,$_p6,0,$_p7,255,255,255"
  -endif
  -if {$10<0}
  _p6={-$10}
  _p7={255+$10}
  _ystr=$_ystr" -apply_curve 0,0,$_p6,255,$_p7"
  -endif
  # GAMMA
  -if {$11!=1.0}
  _ystr=$_ystr" -apply_gamma $11"
  -endif
  # APPLY VALUE PROCESSING
  -if {$_ystr'!='""}
  -apply_channels_old $_ystr,13,0
  -endif
  # CLARITY (midtones unsharp mask)
  -if {$12>0}
  -to_rgb --rgb2hsl -split[-1] c -rm[-2] -rm[-2] -*[-1] 255 -apply_curve[-1] 1,0,0,63,0,127,255,192,0,255,0 --unsharp[0] 5%,$12,0 -cut[-1] 0,255 -cut[-2] 0,255 -reverse[-1,-2] -append[-1,-2] c -blend alpha
  -endif
   # LOCAL CONTRAST (unsharp mask)
  -if {$13>0}
  -unsharp 1%,$13,0
  -cut[-1] 0,255
  -endif
  # COLOR GRADING STEP
  -if {$14}
    -if {$16+$22>360}
      _shh={($16+$22-360)/360}
    -else
      _shh={($16+$22)/360}
    -endif
    _shs={$21/100}
    _shlev={$23}
    _midh={$19/360}
    _mids={$18/100}
    _midlev={$20}
    _highh={$16/360}
    _highs={$15/100}
    _highlev={$17}
    _satlev={$24}
    -color_grade $_shh,$_shs,$_shlev,$_midh,$_mids,$_midlev,$_highh,$_highs,$_highlev,$_satlev
  -endif
  # HSV SATURATION (linear)
  -if {$24!=1.0}
    -gimp_equalize_s $24,0
  -endif
  # USM
  -if {$25>0}
    -unsharp 0.5,$25
    -cut 0,255
  -endif
  # CHROMA NR
  -if {$26>0}
    -apply_channels_old "-denoise_haar $26",5,0
    -apply_channels_old "-denoise_haar $26",6,0
  -endif


Top
 Post subject: Re: Saturation filter
PostPosted: Tue Mar 17, 2015 6:56 am  (#25) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Thanks johniak, this has been updated


Top
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group