I am trying to rotate a picture with C#, and am using this code:

```
///create a new empty bitmap to hold rotated image
Bitmap returnBitmap = new Bitmap(newBMP.Width, newBMP.Height);
//make a graphics object from the empty bitmap
Graphics g = Graphics.FromImage(returnBitmap);
//move rotation point to center of image
g.TranslateTransform((float)newBMP.Width / 2, (float)newBMP.Height / 2);
//rotate
g.RotateTransform(-90);
//move image back
g.TranslateTransform(-(float)newBMP.Width / 2, -(float)newBMP.Height / 2);
//draw passed in image onto graphics object
g.DrawImage(newBMP, new Point(0, 0)); 

```

The `newBMP` is a bitmap that I getting from a form, and I am changing its size. Then I want to rotate it, but when I try this code above, it cuts the top and the floor of the picture.
After all of this, I save the new pic on the server.

All works fine except the rotate... 

Anyone see the problem?

**solved** i used this: [C# rotate bitmap 90 degrees](https://stackoverflow.com/questions/2225363/c-sharp-rotate-bitmap-90-degrees)