Hi all......
How to use image resize algorithm like bilinear interpolation algo in C?
is there any site or link regarding this?
Thanks in advance
Bhupesh
www.hindisongschords.blogspot.com
Hi all......
How to use image resize algorithm like bilinear interpolation algo in C?
is there any site or link regarding this?
Thanks in advance
Bhupesh
www.hindisongschords.blogspot.com
Did you try google?
This seems to be a good page:
http://wiki.allegro.cc/index.php?title=BilinearResize
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
When the destination image is larger, loop in terms of its X and Y, then to find the source pixel to copy, divide both X and Y by the scale factor. If you use ints, then you will get the simple 'nearest neighbour' style algorithm when you copy from source to destination.
Otherwise they will need to be floats - the mantissas (mantissae?) of which (calculated as n - (int) n) will be your interpolation degree between adjacent pixels.
It is then up to you how you choose to blend adjacent colours based on this value.
Last edited by samGwilliam; 09-17-2008 at 06:15 AM.
Current Setup: Win 10 with Code::Blocks 17.12 (GNU GCC)
Hi matsp n Sam
Thanks for the reply...
thanks for the link, here i got some valuable info on that. (allegro wiki)..
Bhupesh
www.hindisongschords.blogspot.com
If you are on Windows and you want a fast solution (and by fast I mean run-time and coding-time) then I believe GDI+ has bilinear filtering capabilities.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"