Problem with billinear filtering with fixed point math

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Codemss
Veteran
Posts: 124
Joined: Sun Jun 24, 2007 6:49 am
Location: Utrecht, The Netherlands
Contact:

Problem with billinear filtering with fixed point math

Post by Codemss »

I made a rotozoomer that is billinear interpolated and uses fixed point math, but it has a big problem. Everywhere were dark pixels should be, white pop up. It really irritates me because I really spend some time on the program and this is the last bug, if this one's out then I can be extremely proud of my program.
Anyway, does anybody recognize the problem or knows what to do with it? If I wasn't clear, ask me about it. BTW, the problem is not because of colour values becoming too low(below zero) or too high(above 255), because I tried an IF to check if that was true, but it wasn't. Anyway, thanks for reading :P. And hello(I haven't been on any qbasic forum for a long time).
Check out my site: <a href="http://members.lycos.nl/rubynl">Click here</a>
Hope you like it. Send some feedback if you want: <a href="mailto:basicallybest@live.nl">Mail me</a>
Codemss, before known as RubyNL
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post by Mentat »

Maybe MOD overflow backwards. Happened to me, and I got a cool fractal.
For any grievances posted above, I blame whoever is in charge . . .
User avatar
Codemss
Veteran
Posts: 124
Joined: Sun Jun 24, 2007 6:49 am
Location: Utrecht, The Netherlands
Contact:

Post by Codemss »

I think it is due of the inaccuraccy of integer math, because when I changed the scaleing size to a bigger, there were a lot more pixels coloured wrong. still I hate this error, but I'll still put the rotozoomer in a demo because it's kind of impressive.
Check out my site: <a href="http://members.lycos.nl/rubynl">Click here</a>
Hope you like it. Send some feedback if you want: <a href="mailto:basicallybest@live.nl">Mail me</a>
Codemss, before known as RubyNL
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post by Mentat »

Hm. Are you using any bitwise calculations or manipulation?
For any grievances posted above, I blame whoever is in charge . . .
Post Reply