Please note that...
i forgot the URL of my own source ( when i set it up I tried a lot of sides..now i can't remember which i chosen )
and so as now i cannot put there but only post hereThe filter is for downscale ,it uses the method discussed here
viewtopic.php?f=4&t=5303&start=20and
can NOT be used to scale up, the final width and height MUST be minor (or equal )the original.
marked in red the essential controls:
the pre-blur is computed automatically so all what is needed is chose the new image size :
there are 3 options:
1) Set new Width and Height, use this to scale differently W and H
2) Preserve image ratio, set new W
3) preserve image ratio set new H
All the others controls are for 1 optional step for post sharpening
For this i was tempted to simplify, removing most of controls and hardcoding most of values..please let me know what you preferbelow the simplified version
#############################################################
#@gimp Scale Down neat : gimp_scaledown, gimp_scaledown_preview(1)
#@gimp : sep = separator()
#@gimp : note = (" To scale down preserving clean edges and smoothly sharpen")
#@gimp : sep = separator()
#@gimp : Scale down to = choice(1," New Width and Height ", " preserve_image_ratio Set new Width " , "preserve_image_ratio Set new Height",)
#@gimp : New Width = int(1600,16,3200)
#@gimp : New Height = int(1600,16,3200)
#@gimp : sep = separator()
#@gimp : Skip Post Sharpening = bool(false)
#@gimp : sep = separator()
#@gimp : note = note(""Skip Post Sharpening": if chosen will deactivate all controls below ")
#@gimp : sep = separator()
#@gimp : Spatial radius = float(1.25,0,20)
#@gimp : Bilateral radius = float(30,0,60)
#@gimp : Amount = float(2.3,0,10)
#@gimp : Darkness level = float(1,0,4)
#@gimp : Lightness level = float(0.2,0,4)
#@gimp : Channel(s) = choice("All","RGBA","RGB","Luminance","Blue/red chrominances","Blue chrominance","Red chrominance","Lightness","ab-components",("All","RGBA","RGB","Luminance","Blue/red chrominances","Blue chrominance","Red chrominance","Lightness","ab-components","a-component","b-component","Hue","Saturation","Value","Key","Alpha","ch-components","c-component","h-component","Red","Green","Blue","Alpha")
#@gimp : sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical")
#@gimp : note = note{"\n\n<small><b>Note : </b> The filter was inspired by this discussion http://www.gimpchat.com/viewtopic.php?f=4&t=5303&start=20
</small>"}
#@gimp : sep = separator(), note = note("<small>Author : <i>Photocomix;</i>. Latest update : <i>2012/9/20</i>.</small>")
gimp_scaledown :
-if {$1==0} -blur_xy {w/$2},{h/$3}
-elif {$1==1} -blur_xy {w/$2},{w/$2}
-elif {$1==2} -blur_xy {h/$3},{w/$2}
-endif
-if {$1==0}
-resize $2,$3,2
-elif {$1==1}
-resize2dx $2,2
-elif {$1==2}
-resize2dy $3,2
-endif
-if {$4==1}
-gimp_unsharp 0,$5,$6,$7,$8,$9,1,0,$10
-endif
gimp_scaledown_preview :
-gimp_split_preview "-gimp_scaledown ${1--2}",$-1
#########################################################################
#####################################################################