Vector Lib output without interpolation

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Vector Lib output without interpolation

Post by walbus »

The Vector library offers a nice smoothing of edges
The question is whether the library doesn't offer a way to disable this.
This is very annoying for the further processing of images as sprites, because the Sprite mask is damaged by the new created colors.
Justin
Addict
Addict
Posts: 829
Joined: Sat Apr 26, 2003 2:49 pm

Re: Vector Lib output without interpolation

Post by Justin »

+1
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Vector Lib output without interpolation

Post by freak »

The library is supposed to be output-independent and interpolation (or non-interpolation for that matter) is not a concept that exists on every output.
quidquid Latine dictum sit altum videtur
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Vector Lib output without interpolation

Post by Mistrel »

I'm not following exactly what this request is for. I think I do but I might be wrong.

Would you provide a code example for my own clarification, please?
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Vector Lib output without interpolation

Post by walbus »

@Freak, i understand not exactely what you mean with your hint, but thanks for your answer

@Mistrel
To reproduce it, you can do the following :
Load the latest BF Packet

Select in the download packet the file "Clean_a_Sprite_Mask.pb"
Change in this file Line 23 to percent_color_distance=25
Start this tool
Select : Image_set/Rose.jpg
This create a new file with a cleaned mask named "Rose_.png"

Select now the demo file "Rotate_Sprites_and_images.pb"
Change in this file :
Line 21 to Rose$="./Image_Set/Rose_.png"
Change Line 78 to "; SetColorDistanceSpriteMask_BF(0)
Change Line 106 and 107 the resizing parameters output_width and output_height to zero - This is important
(Because resizing use here interpolation and add new artifacts)
Run the demo, now you see the Vector Lib created artifacts on a animated sprite

This may seem very special at first.
However, it considerably hinders the efficient use of Vector Lib for sprites.

I think interpolation also has a significant effect on the output speed

On BF you can deactivate resize interpolation with this call : ResizeInterpolation_BF(0)
The results without resize interpolation are mostly OK and differences absolutely not visible

So i miss :
VectorOutputInterpolation_BF(0)
RotatingInterpolation_BF(0)
That would simplify things a lot

Image
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Vector Lib output without interpolation

Post by walbus »

That's what I love about PB Support :evil:

The answer is 42

It's really no fun anymore
User avatar
PedroMartins
User
User
Posts: 47
Joined: Sat Sep 02, 2017 7:30 pm

Re: Vector Lib output without interpolation

Post by PedroMartins »

*** to Administrator: please delete this post reply ***
Last edited by PedroMartins on Fri Apr 06, 2018 2:17 pm, edited 1 time in total.
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Vector Lib output without interpolation

Post by walbus »

Hi Pedro, yes, 42 is not age, 42 is the answer to everything
Look here:
(You could also say it's a worthless and pointless answer)
https://simple.wikipedia.org/wiki/42_(answer)

When I have finished working on BF, which is already the case, I will leave PB more and more
There's nothing left to keep me here
I don't enjoy programming anymore, I programmed too much in my life

Image
User avatar
PedroMartins
User
User
Posts: 47
Joined: Sat Sep 02, 2017 7:30 pm

Re: Vector Lib output without interpolation

Post by PedroMartins »

*** to Administrator: please delete this post reply ***
Last edited by PedroMartins on Fri Apr 06, 2018 2:17 pm, edited 1 time in total.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Vector Lib output without interpolation

Post by freak »

walbus wrote:That's what I love about PB Support :evil:
Please remember that the purpose of this forum is a wish-list. Its not an ask-for-a-feature-and-get-a-answer-within-1-business-day-list forum.

People like you are the reason why I rarely answer anymore in the first place. I give an answer you don't like and suddenly you think you have a reason to be mad.

Its a wish-list... not every wish can come true.
quidquid Latine dictum sit altum videtur
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Vector Lib output without interpolation

Post by walbus »

I just asked you to elaborate on your answer, but that was probably too much.

People like you are the reason I don't want to program with PB anymore.

Whether you like it or not,
I've never offended you before, but getting an answer is the least I should be allowed

It's your software, what's the use of not wanting to answer if your customers don't suit you?
This is unprofessional !

Explain that to your boss, if you have one, he'll explode, i think....

I've given a lot to the community too, not everyone does.
And it's too much for you to answer me, because I don't nod submissively to everything
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Vector Lib output without interpolation

Post by freak »

I did answer! You didn't like it and demanded more answers. So what answer other than "yes, right away" can I give without you getting mad eventually?

The only way to win is not to play.
quidquid Latine dictum sit altum videtur
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Vector Lib output without interpolation

Post by walbus »

I wrote to you that I couldn't interpret your answer and asked for a supplement

That has absolutely nothing to do with like or dislike

And I certainly wasn't unfriendly

You can turn it any way you want, you denied me the answer to a friendly question, that's all

I don't want to argue with you either, but sometimes it just has to come out

I'm not a player, I've never played before and I never will
You don't solve problems with unobjective sayings
User avatar
PedroMartins
User
User
Posts: 47
Joined: Sat Sep 02, 2017 7:30 pm

Re: Vector Lib output without interpolation

Post by PedroMartins »

*** to Administrator: please delete this post reply ***
Last edited by PedroMartins on Fri Apr 06, 2018 2:18 pm, edited 1 time in total.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Vector Lib output without interpolation

Post by freak »

walbus wrote:You can turn it any way you want, you denied me the answer to a friendly question, that's all
I didn't deny you anything because I don't owe you anything.

Once again: This is the wish-list forum. You can post your requests, you can discuss them with other people (sometimes we join the discussion, sometimes not). But nobody owes you anything just because you posted here!

Now, you keep repeating that you weren't unfriendly, but the fact is that you went straight from
walbus wrote:@Freak, i understand not exactely what you mean with your hint, but thanks for your answer
to
walbus wrote:That's what I love about PB Support :evil:
Sorry, but I personally find that a bit rude. Did it ever occur to you that maybe I missed your post? Or maybe I read it but forgot about it? I do have a live outside of this place you know. Would it have hurt you to simply ask the question again? That would have been the polite way to continue the conversation. But you went straight to outrage. Did you expect that that would get you the answer? To be honest, now I really don't feel like explaining anything to you.
quidquid Latine dictum sit altum videtur
Post Reply