It is currently Tue Apr 16, 2024 5:05 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 13 posts ] 
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: 12516
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
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 1:32 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
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
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: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 1:54 am  (#3) 
Offline
GimpChat Member
User avatar

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

_________________
"Where am I ?"


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

Joined: May 16, 2010
Posts: 14709
Location: USA
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
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: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 2:36 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
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
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: 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: 12516
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
 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: 1171
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 2711 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 133 times
Top
 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: 12516
Thanks Kevin; works fine. :)

_________________
Lyle

Psalm 109:8

Image


Top
 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: 12516
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 2702 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 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: 1171
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
 Post subject: Re: Not sure if this downsampling Script-fus been written already.
PostPosted: Fri May 17, 2013 5:51 am  (#11) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
paynekj wrote:
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

Just to clarify, this forum doesn't physically resize images. Images are dynamically scaled for the display. You can view large images (>760px) at their actual size by clicking the image, then clicking the "full size" square in the Lightbox navigation tab.

Image

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


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

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
GnuTux wrote:
paynekj wrote:
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

Just to clarify, this forum doesn't physically resize images. Images are dynamically scaled for the display. You can view the image at its actual size by clicking the image, then clicking the "full size" square in the Lightbox navigation tab.


I understand that, but the end result is that an image is displayed that has been re-sized using a process that's out of the control of the creator of the image and creators should be aware of that. Obviously in most cases it's not important, but occasionally it will matter.

My point in suggesting Lyle re-size an image to "GimpChat" size was to see if there is any noticeable difference- In Lyle's case I suspect not ;) In the case of some of the (in my opinion) overly large images that get posted here I'm not so sure :(

Kevin


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

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
paynekj wrote:
the end result is that an image is displayed that has been re-sized using a process

Again, just to clarify, following the steps I pointed out will result in a display of actual unprocessed, raw image that was uploaded. It's exactly the same as if you right click and select view image. This forum does not physically change the image in any way. Some forum software does physically resize images and even create thumbnails, but this forum doesn't.

Browsers, however, can and will, render images differently than what we see when we view the raw image in GIMP but that is not due to this forum's software.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) The Written Works of Wilber

44

No new posts Attachment(s) Looking for Script Coder to make Script of my VHS effect

2

No new posts Attachment(s) Cannot run test script-fu script via console

7

No new posts Attachment(s) A liitle Start Help with a Script-Fu Script

3

No new posts Attachment(s) Script-fu

6



* Login  



Powered by phpBB3 © phpBB Group