This project is read-only.

Bicubic Resize Algorithm

Mar 18, 2010 at 4:55 PM

Gheeezz.. why didn't I find your project before I started working on my code,

anyway I noticed you don't have a Bicubic resize algorithm.

There's a C# bicubic algorithm in this page here.

I converted it to VB.Net code, but I guess you shouldn't have trouble since your lib is in C#

Mar 19, 2010 at 12:30 AM


I guess you want to contribute a bicubic resizing functionality. It would be the most helpful if you have a look how the bilinear resizing is implemented and provide a patch or attach the code to a new issue item.

Mar 19, 2010 at 2:47 AM
Edited Mar 19, 2010 at 2:48 AM

Actually I've already ported the code to VB.

I haven't looked at your code so I'm not too sure how your function is structured. If I'm free I'll just fix it up to be Silverlight executable code and insert it as per your suggestion. I was just thinking someone with C# experience could do it much faster cause I'm not a case sensitive kind of guy. ;)

Mar 19, 2010 at 10:26 AM

The link seems broken.

Cool, if you encounter some problems or struggle too much just come back and I will include your VB code.

Mar 19, 2010 at 4:41 PM

Oh my bad, I denied the clipboard access and typed in the link manually

Mar 19, 2010 at 7:31 PM

OK. Great.

As I already said, if you encounter some problems or struggle too much just come back and I will include your VB code.

Mar 24, 2010 at 10:03 AM

duh, I realized that my VB code probably had some rounding errors due to differences in how VB handles doubles compared to C#

So I quickly changed the code to C#

It's not an extension method yet since I hadn't looked at your source yet, but it's usable for anyone that wants a bicubic resize right now I guess.

Mar 24, 2010 at 11:05 AM

OK, I will check it out and include it. Thanks for contributing.

Mar 25, 2010 at 7:02 AM

Well, don't thank me, go thank the original author. I still can't get my head around the coefficients. :P

Mar 25, 2010 at 8:31 PM

Ah, I almost forgot it's from AForge right? Have you asked the author or does the license of the code allow the usage?


Ah, I just checked the project site. Unfortunately we can't just use (parts of) the Aforge code. It's licensed under the LGPL which means derived code has also to use the LGPL. This doesn't work. :-(

Jan 28, 2011 at 10:48 PM

After searching far and wide for a BSD/MIT or similarly licensed version of a bicubic resize, I'm back here. In order to minimize licensing impact, I have packaged Marauderz's version of this AForge code into its own DLL, also under the LGPL. You can find it here 

FWIW, I did find an MIT-licensed resize algorithm in C++ at the OpenCV project, but my skills are too rusty to tackle a C# conversion.