It is currently Fri Nov 28, 2014 9:07 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 6:19 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6762
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 1:32 am  (#2) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 11585
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 1:54 am  (#3) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 1651
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?

_________________
et veritas liberabit vos


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

Joined: May 16, 2010
Posts: 11585
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 2:36 am  (#5) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 11585
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 4:21 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6762
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 5:01 am  (#7) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 792
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 720 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 53 times
Top
 Profile  
 
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 5:16 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6762
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 5:26 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6762
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 711 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 5:32 am  (#10) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 792
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: Graechan and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* 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