It is currently Mon Jul 22, 2024 10:36 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 8:48 pm  (#1) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
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 here

The filter is for downscale ,it uses the method discussed here viewtopic.php?f=4&t=5303&start=20
and can NOT be used to scale up, the final width and height MUST be minor (or equal )the original.

Image


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 prefer

below the simplified version

Image


#############################################################


#@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



#########################################################################

#####################################################################

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Last edited by PhotoComix on Sun Sep 23, 2012 11:45 pm, edited 4 times in total.

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: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 9:40 pm  (#2) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I have refreshed G'MIC 3 times and it is not showing up. I looked in Testing > PhotoComix and it's just not there. :gaah

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 9:56 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12535
If I'm translating PC right, he forgot his password to his host site for G'MIC; it that's the case, then you have to copy the code and create a file called gmic and place it in the same directory where your G'MIC presets are and it's in a very obscure place depending on your OS O. For Win7 users it's located under your user account name\AppData\Roaming directory. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 10:10 pm  (#4) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Oregonian wrote:
I have refreshed G'MIC 3 times and it is not showing up. I looked in Testing > PhotoComix and it's just not there. :gaah


Can't be in Photocomix testing because is not in my source file
if you have a gmic file paste there, if not save as "gmic" without extension
(in both cases will show on top where are usually the fav)

Or wait till i don't recover the URL of my source file

Quote:
If I'm translating PC right, he forgot his password to his host site for G'MIC


No the password (hopefully) only the URL, i tried a dozens of sides when i had to change from Mahvin place, i forgot which i had chosen...it is a long time that i don't add or update filters

#############################################

I tried a simplified version, to be simplified are only the controls for the optional post sharpening
I unified controls for Darkness and Lightness:
the Darkness/Lightness control now set the Darkness to the value chosen, the Lightness is 1/3 of the Darkness value

Image


The 2 versions doesn't conflict let me know what you prefer

#@gimp Scale Down Neat 2 : gimp_scaledown2, gimp_scaledown2_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 : Amount = float(2.3,0,10)
#@gimp : Darkness/Lightness level = float(1,0,4)

#@gimp : Channel(s) = choice(3,"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 : sep = separator()

#@gimp : sep = separator(), note = note("<small>Author : <i>Photocomix;</i>.      Latest update : <i>2012/9/20</i>.</small>")

gimp_scaledown2 :
-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,1.25,30,$5,0,$6,{$6/3},1,0,$7
-endif

gimp_scaledown2_preview :
-gimp_split_preview "-gimp_scaledown2 ${1--2}",$-1

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Last edited by PhotoComix on Sun Sep 23, 2012 11:46 pm, edited 1 time in total.

Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 10:19 pm  (#5) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
@ O, L (and everybody that may have already copied)

It was a typo in both, corrected now
i suggest to copy again

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 10:47 pm  (#6) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I've copied it but I don't know where to put it. I have no folders called roaming nor do I have any folders called gmic.

Perhaps David can reset your password, PhotoComix.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 11:11 pm  (#7) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
no problem of pw i just need to find the right url, i found already 5 sites with the same file

back to you... in linux the file should be just in your home, but you must chose in your file browser to visualize hidden files
you will have no a .gmic file , because is personal and so must be created,but you should see the others

PS i believe in linux the gmic files have still the dot before the name

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 11:41 pm  (#8) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
PhotoComix wrote:
back to you... in linux the file should be just in your home, but you must chose in your file browser to visualize hidden files
you will have no a .gmic file , because is personal and so must be created,but you should see the others

PS i believe in linux the gmic files have still the dot before the name
I already have hidden files/folders selected. I found files named with gmic and, as you can see, some of the names in the Testing folder in G'MIC are showing. I didn't do the whole list but I think it's enough to show what I have in my home/o folder. There are no folders named gmic.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Sun Sep 23, 2012 11:52 pm  (#9) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
No i already tell you that the .gmic file exist only after you create it, it is for personal filters to be preserved by filters update


you may copy the code with a txt editor, and just save as .gmic there

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 12:37 am  (#10) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
It's there and it's not working. I tried refreshing even tho it really has nothing to do with local files.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 1:22 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14720
Location: USA
It worked for me O by just pasting PC's code in a text file and renaming it .gmic
Then i just saved it to my home folder (rod).

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 1:56 am  (#12) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Scale-down or Scale-up this is the best I've used,Thank-you PhotoComix :yes :bigthup :jumpclap

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 2:17 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Hi PC,
You're URL source for your external filters in G'MIC is actually set to :

http://s406833247.websitehome.co.uk/gmic/photocomix.gmic


I think that would be cool if you can update your sources with your new downscaling filter.
If you can't do it, please tell me about a new URL for your filter sources, otherwise, this means we have a dead link in G'MIC, and that wouldn't be a nice thing.


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 3:15 am  (#14) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
the site doesn't recognize me and don't let me in or recover the PW

I am not even sure it was my own account or my file was hosted by somebody in the gmic flickr group in his account there

This link may work ?
http://www.deviantart.com/download/6699 ... fu3pa.gmic

But on deviantart i can't fully control the file name : "_by_photocomix2-d5fu3pa" is added automatically out of my control, and i am not sure will not be changed when replacing the file.

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 3:19 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
No, you have to be able to ensure your URL won't change, and your location will be accessible by everyone. This looks like DeviantArt doesn't allow this.
Should I remove your 'websitehome' link ? Couldn't you provide a stable URL instead ? :p


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 3:25 am  (#16) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Solved !..well it will be solved at soon Garagecoder will reply

He is hosting the file (i checked on http://www.flickr.com/groups/gmic/discu ... 374166402/ ..last 2 messages ) i already send him a pm

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 3:43 am  (#17) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Graechan wrote:
Scale-down or Scale-up this is the best I've used,Thank-you PhotoComix :yes :bigthup :jumpclap


Upscale was not the goal ..but a very slight blur (really slight if the filter used for upscale because the blur is equal to the proportion between original size and desired size...so is less then 1 when upscaling ) followed by a slight dark halo sharpening almost always improve the look

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 6:04 am  (#18) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Panic averted people! Filter update should now add the new filters, I've been a bit busy this past week so didn't notice the new stuff. Re-sent your ftp login details photocomix so you can update it yourself as well.


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 6:30 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12535
Thanks GC. hey PC; anyway possible to add a keep aspect ratio option (only then need a single slider)? Have to play with post sharpening feature, but I did get good results using wavelet sharpening plugin afterwars. No aliasing to boot. Good work. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: [GMIC] "Scale Down Neat " new filter for testing
PostPosted: Mon Sep 24, 2012 7:07 am  (#20) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Rod wrote:
It worked for me O by just pasting PC's code in a text file and renaming it .gmic
Then i just saved it to my home folder (rod).
I thought after I turned on my computer this morning it might work. Nada. I re-copied the code and saved it. Nada. :(

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Testing Gmic-Qt Standalone 3.1

4

No new posts Attachment(s) My Experiments On GMIC Testing filters: Simple Graphics (now 14)

1046

No new posts Attachment(s) Gmic:morphological filter

7

No new posts Attachment(s) How To Run A GMIC Filter On Hundreds Or Thousands Of Layers

61

No new posts Attachment(s) New filter using Gimp&Gmic: GUIDED POLYGONIZE (upd)

58


cron

* Login  



Powered by phpBB3 © phpBB Group