a couple questions:
Why are you using a static function?
How are you calling this function from your code?
Are you intending to change the value of Bitmap 'b' and later accessing it from your main?
Consider the following function:
public Bitmap Resize( Bitmap b, int nWidth, int nHeight )
{
Bitmap result = new Bitmap( nWidth, nHeight );
using( Graphics g = Graphics.FromImage( (Image) result ) )
g.DrawImage( b, 0, 0, nWidth, nHeight );
return result;
}
http://www.peterprovost.org/archive/2003/05/29/516.aspx
- A.Kahtava