It is currently Sun Mar 29, 2015 4:44 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Not sure if this downsampling Script-fus been written already.
PostPosted: Thu May 16, 2013 7:19 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 7311
I would like a downsampling script-fu that follows the following flow:

Gausean Blur radius equals Original size divided by new size which equals GB.

Image blurred with GB,then reduce the size to the new size (straight downsample; no interpolation).

Can add an optional USM, but I would prefer to use my own sharpening technique afterwards.

Currently, I downsample using this method and it appears to help with the aliasing and stuff.

Thanks in advance. :)

_________________
Lyle

Psalm 109:8

Image


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 2:32 am  (#2) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 11945
Location: "Looking for my eraser" =P
I think i get you.
You want to take an image any size, divide it by your new INPUT size, and use that value for Gaussian blur correct?
Then resize the ORIGINAL image to the INPUT size.
Also do not include Unsharp Mask.
OR
Include an area you can place a value for sharpening with Unsharp Mask?

Am i following you so far?

How about a simple script that you can enter your own GSB and USM in, and then resize it?

_________________
Image
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 2:54 am  (#3) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 2077
Location: roma, italy
Rod, I guess Lylejk suggestion (automatically determining the amount of GaussianBlur) is preferable to the option of inputing it.
As far as my incompetence can understand, in any case it should be a not very complex task for a nice programmer like you Rod, to implement this function, am I wrong?

_________________
quid est homo, quod memor es eius,
aut filius hominis, quoniam visitas eum?


Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 3:29 am  (#4) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 11945
Location: "Looking for my eraser" =P
This is what i get from Lyles post.
Image

Still working on the resize part though.

This image is 2816x2112 and i want it 5 times smaller so i divide by 5 and get 563x422 give or take. :)
Then i set the hblur and vblur for 5.

_________________
Image
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 3:36 am  (#5) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 11945
Location: "Looking for my eraser" =P
Oh i think i got it now.You want the script to calculate the blur radius after you input a new image size right?
So what would be your blur for the above image Lyle?

(2816x2112/5)

_________________
Image
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 5:21 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 7311
Yes; I want the script to apply a guassean blur before downsizing the image (no interpolation). The applied blur before downsizing helps with aliasing issues and such. Again, when I downsize, I do this flow all the time. You can add an unsharp mask afterwards if you want (a little sharpening is necessary), but I prefer using wavelet sharpening (so just rather do that step on my own since sharpening tends to be subjective anyway). Only reason I do downsize is posting images for view at other sites. It's not a critical Script-fu for me, but you all know how lazy I am so why not. lol

:)

_________________
Lyle

Psalm 109:8

Image


Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 6:01 am  (#7) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 845
Location: Here and there
Try this one for size Lyle

It appears in a contributed >> Preblur Resize... menu (you can decide where you actually want to put it)

Attachment:
Untitled.png
Untitled.png [ 7.32 KiB | Viewed 790 times ]

You can tell it not to detect which is bigger - width or height in which case it will use both values you enter.

Kevin


Attachments:
lylekj_preblur_resize.scm [2.14 KiB]
Downloaded 61 times
Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 6:16 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 7311
Thanks Kevin; works fine. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 6:26 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 7311
Here's a result after I applied wavelet sharpening as the followup (downsized from 2164px to 900px). No aliasing. Happy I am. :)


Attachments:
L10000408_wvlt.jpg
L10000408_wvlt.jpg [ 522.62 KiB | Viewed 781 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 6:32 am  (#10) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 845
Location: Here and there
It would be interesting to see what the result is if you post an image that this forum doesn't automatically re-size (i.e. max 760px wide)

Kevin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


Jump to:  

   Similar Topics   Author   Replies   Views   Last post 
No new posts Can a script be written that

in Gimp Scripts and Plugins

Rod

5

647

Tue Aug 09, 2011 6:24 am

dd View the latest post

No new posts How scripts are written

in Off Topic Chit-Chat

ofnuts

2

317

Tue Jan 21, 2014 7:54 am

Rod View the latest post

No new posts Keeping the video and written tutorials on different boards.

in Gimp Chat Site Support

molly

7

1080

Tue Apr 13, 2010 10:30 pm

GnuTux View the latest post

No new posts Attachment(s) Colorful Glowing Text Effect [Video and Written Tut]

in Text Tutorials

JFish

8

821

Fri Jun 24, 2011 11:01 am

Oregonian View the latest post

No new posts Attachment(s) Letter Pressed, Indented Text Tutorial (written tut)

[ Go to page: 1, 2, 3, 4 ]

in Text Tutorials

Jolie

33

5977

Sun May 01, 2011 1:29 pm

2-ton View the latest post



* Login  

* Subscribe to Gimp Chat's RSS Feed    * Subscribe to Gimp Chat's Tutorial Feed    * Subscribe to Gimp Chat's G'MIC Feed


Powered by phpBB3 © phpBB Group