I just went through a bunch of stuff trying to figure out how to get the image to even rotate. That works but now it\'s clipping and I\'m not really sure how to make it stop
public Bitmap rotateImage(Bitmap b, float angle)
{
if (angle > 0)
{
int l = b.Width;
int h = b.Height;
double an = angle * Math.PI / 180;
double cos = Math.Abs(Math.Cos(an));
double sin = Math.Abs(Math.Sin(an));
int nl = (int)(l * cos + h * sin);
int nh = (int)(l * sin + h * cos);
Bitmap returnBitmap = new Bitmap(nl, nh);
Graphics g = Graphics.FromImage(returnBitmap);
g.TranslateTransform((float)(nl-l) / 2, (float)(nh-h) / 2);
g.TranslateTransform((float)b.Width / 2, (float)b.Height / 2);
g.RotateTransform(angle);
g.TranslateTransform(-(float)b.Width / 2, -(float)b.Height / 2);
g.DrawImage(b, new Point(0, 0));
return returnBitmap;
}
else return b;
}