ResizeImage() and #PB_Image_Smooth

Just starting out? Need help? Post your questions and find answers here.
starax
User
User
Posts: 26
Joined: Sun Jun 01, 2003 7:28 pm

ResizeImage() and #PB_Image_Smooth

Post by starax »

Hi Folks!,

Does anybody know of a workaround for ResizeImage() not smoothing the images as advertized.

I tried with and without the PB_Image_Smooth parameter and still no smoothing. Just raw, raw and raw.

Any suggestions would be greatly appreciated!

Thanks!

oh! and btw - I'm a Windows XP user!
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

Can you post your code and possibly a link to your image as the smoothing has never failed to work on my computer.

BTW,
the manual wrote: Note: This function changes the handle of the used image. Therefore it must be newly assigned e.g. to an ImageGadget() with SetGadgetState(). The image size is currently limited to 8192x8192 pixels (if the available memory allow it).
You are using the new image and not the old one aren't you?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: ResizeImage() and #PB_Image_Smooth

Post by Trond »

starax wrote:Hi Folks!,

Does anybody know of a workaround for ResizeImage() not smoothing the images as advertized.
Sure, just call it correctly.
I tried with and without the PB_Image_Smooth parameter and still no smoothing. Just raw, raw and raw.
Compare the title of the topic to what you said you tried in your sentence and you will find your error.
starax
User
User
Posts: 26
Joined: Sun Jun 01, 2003 7:28 pm

Post by starax »

Okay, well with you guys being so sure that it worked I finally carried out some *proper* tests and it does indeed appear to be "working".

I think the problem was that I was expecting a little more smoothing than it was giving. So it was easy to overlook the effect with the type of images I was resizing.


Anyway, thanks for replying!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Are you sure you didn't use PB_Image_Smooth instead of #PB_Image_Smooth?
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Couple small points, if you don't specify a mode you will get #PB_Image_Smooth by default. It's Raw that you have to ask for specifically. Also, since #PB_Image_Smooth=0 forgetting the # wouldn't cause a problem. (unless you had initialized a var named PB_Image_Smooth with a value other than 0, but that's unlikely)
BERESHEIT
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

netmaestro wrote:Couple small points, if you don't specify a mode you will get #PB_Image_Smooth by default. It's Raw that you have to ask for specifically.
That explains it. :oops:
User avatar
idle
Always Here
Always Here
Posts: 5925
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Post by idle »

does anyone know what algorithm the smoothing uses

linear - bilinear - bicubic ?
Post Reply